summaryrefslogtreecommitdiff
path: root/Kernel/FutexQueue.h
AgeCommit message (Collapse)Author
2021-08-24Kernel: Don't register thread as custom data for FutexBlockerAndreas Kling
Same deal as WaitQueueBlocker, we can get the blocked thread from Blocker::thread() now, so there's no need to register the current thread as custom data.
2021-08-23Kernel: Remove unnecessary FutexQueue::did_remove()Andreas Kling
This was only ever called immediately after FutexQueue::try_remove() to VERIFY() that the state looks exactly like it should after returning from try_remove().
2021-08-23Kernel: Rename Thread::BlockCondition to BlockerSetAndreas Kling
This class represents a set of Thread::Blocker objects attached to something that those blockers are waiting on.
2021-08-23Kernel: Mark BlockCondition subclasses as finalAndreas Kling
2021-08-22Kernel: Rename ScopedSpinlock => SpinlockLockerAndreas Kling
This matches MutexLocker, and doesn't sound like it's a lock itself.
2021-08-22Kernel: Rename SpinLock => SpinlockAndreas Kling
2021-08-17Kernel+Userland: Remove global futexesAndreas Kling
We only ever use private futexes, so it doesn't make sense to carry around all the complexity required for global (cross-process) futexes.
2021-08-07Kernel: Move SpinLock.h into Locking/Jean-Baptiste Boric
2021-08-06Kernel: Move Kernel/Memory/ code into Kernel::Memory namespaceAndreas Kling
2021-08-06Kernel: Rename Kernel/VM/ to Kernel/Memory/Andreas Kling
This directory isn't just about virtual memory, it's about all kinds of memory management.
2021-07-07Kernel: Fix futex race that could lead to thread waiting foreverTom
There is a race condition where we would remove a FutexQueue from our futex map and in the meanwhile another thread started to queue itself into that very same futex, leading to that thread to wait forever as no other wake operation could discover that removed FutexQueue. This fixes the problem by: * Tracking imminent waits, which prevents a new FutexQueue from being deleted that a thread will wait on momentarily * Atomically marking a FutexQueue as removed, which prevents a thread from waiting on it before it is actually removed from the futex map.
2021-04-29Everywhere: Use "the SerenityOS developers." in copyright headersLinus Groh
We had some inconsistencies before: - Sometimes "The", sometimes "the" - Sometimes trailing ".", sometimes no trailing "." I picked the most common one (lowecase "the", trailing ".") and applied it to all copyright headers. By using the exact same string everywhere we can ensure nothing gets missed during a global search (and replace), and that these inconsistencies are not spread any further (as copyright headers are commonly copied to new files).
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 *
2021-01-17Kernel: Some futex improvementsTom
This adds support for FUTEX_WAKE_OP, FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_REQUEUE, and FUTEX_CMP_REQUEUE, as well well as global and private futex and absolute/relative timeouts against the appropriate clock. This also changes the implementation so that kernel resources are only used when a thread is blocked on a futex. Global futexes are implemented as offsets in VMObjects, so that different processes can share a futex against the same VMObject despite potentially being mapped at different virtual addresses.