summaryrefslogtreecommitdiff
path: root/kern/spinlock.c
AgeCommit message (Collapse)Author
2018-04-21Fix atomic operations argument typesRichard Braun
In preparation of the rework of atomic operations, all atomic function calls are fixed to use fully supported, compatible types. This means that atomic operations ar erestricted to 32-bit and 64-bit, and that value types must be strictly compatible with pointer types.
2018-04-19kern/atomic: remove shortcutsRichard Braun
These shortcuts just don't bring enough value.
2018-03-03kern/spinlock: minor comment fixRichard Braun
2018-03-02kern/spinlock: fix and optimizeRichard Braun
Making the unlock operation block allows tricky deadlocks to occur in case a thread is interrupted right before announcing itself as the first waiter in the queue. Since locking is expected to block, the spinlock implementation is reworked to move the hand-off performed by the unlock operation into the lock operation. As a side effect, the common case of a single waiter is also optimized.
2018-02-24New errno.h standard headerRichard Braun
Use standard errno codes. This change also adds strerror to string.h.
2018-02-22kern/spinlock: add ownership tracking as a debugging featureRichard Braun
2017-09-21New build systemRichard Braun
The new build system, called xbuild, is a minimalistic kbuild-like make-based build system, also using kconfig for scalable configurations.
2017-07-13Switch to initialization operationsRichard Braun
2017-06-25Use the C11 alignas and noreturn macrosRichard Braun
2017-06-02kern/spinlock: describe memory order constraintsRichard Braun
2017-06-02kern/spinlock: use new atomic accessor macrosRichard Braun
2017-05-30Move assert.h to the include directoryRichard Braun
This turns assert.h into a standard header.
2017-05-29kern/spinlock: replace xxx_once macros with atomic accessorsRichard Braun
2017-05-10kern/spinlock: use atomic accessors instead of memory barriersRichard Braun
2017-05-09Replace sequential consistency with more efficient ordersAgustina Arzille
2017-04-29Revert "Remove unneeded quotes when using #error"Richard Braun
This reverts commit b1aa94d0c7dba4138f651e6b081c1a0055ea8d54. New occurrences of #error are also affected by this commit.
2017-04-04Use the new atomic operations interfaceAgustina Arzille
Stick to a sequentially consistent model for most atomic operations as it matches the semantics of the existing code. Each call site will have to be reevaluated in order to switch to more relaxed accesses where possible.
2017-04-03kern/spinlock: new fair and scalable implementationRichard Braun
This new implementation, based on the MCS locks, provides rigorous fairness and excellent scalability.