summaryrefslogtreecommitdiff
path: root/kern/spinlock_i.h
AgeCommit message (Collapse)Author
2018-04-19kern/atomic: remove shortcutsRichard Braun
These shortcuts just don't bring enough value.
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-03-02kern/spinlock: fix direct use of CONFIG_SPINLOCK_DEBUGRichard Braun
2018-02-24New errno.h standard headerRichard Braun
Use standard errno codes. This change also adds strerror to string.h.
2018-02-24Don't use reserved identifiersRichard Braun
2018-02-22kern/spinlock: add ownership tracking as a debugging featureRichard Braun
2017-05-30Move assert.h to the include directoryRichard Braun
This turns assert.h into a standard header.
2017-05-09Replace sequential consistency with more efficient ordersAgustina Arzille
2017-04-09kern/{mutex,rtmutex,spinlock}: optimize fast pathsRichard Braun
Rework so that fast paths occupy the first indentation level, and use the unlikely macro on the relevant conditions.
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.
2017-02-20kern/spinlock: make spinlock_trylock return ERROR_BUSY instead of 1Richard Braun
2017-02-04kern/types: split into module-specific type headersRichard Braun
Using a single header for all types causing inclusion circular dependencies isn't very elegant and doesn't scale.
2016-12-09Force brackets around one-line conditional statementsRichard Braun
This change was done using astyle, with a few manual editing here and there.
2014-06-18kern/thread: add thread_joinRichard Braun
This change affects more files than it apparently would at first glance. This is because circular dependencies can easily be created between the thread, mutex, condition and spinlock modules. As a result, some of the types of these modules are now defined in kern/types.h.
2014-01-03Update calls to atomic operationsRichard Braun
Make spin locks and mutexes encode their state on an int rather than a long.
2013-04-03kern/spinlock: replace compare-and-swap with a simpler exchangeRichard Braun
2013-04-03kern/spinlock: change the interface of trylock functionsRichard Braun
Make trylock functions behave as error-returning functions.
2013-02-26kern/spinlock: add interrupt-handling locking primitivesRichard Braun