summaryrefslogtreecommitdiff
path: root/Kernel/ProcessGroup.cpp
AgeCommit message (Collapse)Author
2021-07-11Kernel: Standardize the header include style to 'include <Kernel/...>'Brian Gianforcaro
This is the overwhelming standard in the project, but there were some cases in the kernel which were not following it, lets fix those cases!
2021-06-24Everywhere: Use nothrow new with `adopt_{ref,own}_if_nonnull`Daniel Bertalan
This commit converts naked `new`s to `AK::try_make` and `AK::try_create` wherever possible. If the called constructor is private, this can not be done, so we instead now use the standard-defined and compiler-agnostic `new (nothrow)`.
2021-06-03Kernel: Switch ProcessGroup to IntrusiveList from InlineLinkedListBrian Gianforcaro
2021-05-21Revert "Kernel: Avoid allocating under spinlock in ProcessGroup::find_or_create"Brian Gianforcaro
This reverts commit e95eb7a51d8295c96cddf20f116139deecbb69d4. This is causing some sort of list corruption, as evident by #7313 I haven't been able to figure it out yet, so lets revert this change until I can figure out what's going on.
2021-05-21Revert "Kernel: Fix regression, removing a ProcessGroup that not in the list"Brian Gianforcaro
This reverts commit bbe315d8c0e36368091806f7ba1860d848e9bca7. This is un-needed when reverting the parent commit.
2021-05-20Kernel: Fix regression, removing a ProcessGroup that not in the listBrian Gianforcaro
I introduced this bug in e95eb7a51, where it's possible that the ProcessGroup is created, but we never add it to the list. Make sure we check that we are in the list before removal. This only broke booting in self-test mode oddly enough. Reported-By: Andrew Kaster <andrewdkaster@gmail.com>
2021-05-20Kernel: Avoid allocating under spinlock in ProcessGroup::find_or_createBrian Gianforcaro
Avoid allocating while holding the g_process_groups_lock spinlock, it's a pattern that has a negative effect on performance and scalability, especially given that it is a global lock, reachable by all processes.
2021-05-20Kernel: Make ProcessGroup::find_or_create API OOM safeBrian Gianforcaro
Make ProcessGroup::find_or_create & ProcessGroup::create OOM safe, by moving to adopt_ref_if_nonnull.
2021-04-23AK: Rename adopt() to adopt_ref()Andreas Kling
This makes it more symmetrical with adopt_own() (which is used to create a NonnullOwnPtr from the result of a naked new.)
2021-04-22Everything: Move to SPDX license identifiers in all files.Brian Gianforcaro
SPDX License Identifiers are a more compact / standardized way of representing file license information. See: https://spdx.dev/resources/use/#identifiers This was done with the `ambr` search and replace tool. ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2020-11-30Kernel: Move block condition evaluation out of the SchedulerTom
This makes the Scheduler a lot leaner by not having to evaluate block conditions every time it is invoked. Instead evaluate them as the states change, and unblock threads at that point. This also implements some more waitid/waitpid/wait features and behavior. For example, WUNTRACED and WNOWAIT are now supported. And wait will now not return EINTR when SIGCHLD is delivered at the same time.
2020-08-19Kernel: Distinguish between new and old process groups with equal pgidsAnotherTest
This does not add any behaviour change to the processes, but it ties a TTY to an active process group via TIOCSPGRP, and returns the TTY to the kernel when all processes in the process group die. Also makes the TTY keep a link to the original controlling process' parent (for SIGCHLD) instead of the process itself.