summaryrefslogtreecommitdiff
path: root/kern/thread.c
AgeCommit message (Collapse)Author
2018-02-22kern/spinlock: add ownership tracking as a debugging featureRichard Braun
2018-02-20kern/llsync: remove moduleRichard Braun
2018-02-20kern/rcu: new moduleRichard Braun
This module implements preemptible RCU.
2018-02-20kern/thread: remove sref registration callsRichard Braun
The upcoming RCU implementation requires scalable reference counters to be usable in interrupt context, and in particular, in the periodic tick handler, when an idle thread may be running, and the local processor is not registered.
2018-02-12kern/thread: minor changesRichard Braun
Make thread_runq_schedule() slightly more resilient by setting the next thread pointer to NULL after the context switch.
2018-01-30Fix condition variable broadcastingRichard Braun
The broadcast implementation is based on an invalid assumption, namely that the first mutex_unlock call following condition_wait would be invoked on the same mutex. Fixing this while guarding against the thundering herd effect requires augmenting mutexes with a pointer to the condition variable they may be associated with. Since the size of mutexes is currently more important than broadcast scalability, the implementation is simplified into one which suffers from the thundering herd effect.
2018-01-29Fix undefined behavior in conditional macro replacementRichard Braun
See C11 6.10.3 ยง11 : If there are sequences of preprocessing tokens within the list of arguments that would otherwise act as preprocessing directives, the behavior is undefined.
2018-01-10kern/thread: minor name changesRichard Braun
Call the various thread-local nesting counters "levels".
2018-01-07kern/thread: fix initialization raceRichard Braun
2017-12-03Revert "Make assert have no side effects"Richard Braun
This reverts commit d18d0e85596f90e0bd597b33d58209d0b3973c95.
2017-09-21Merge branch 'xbuild'Richard 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-09-20kern/thread: restore comment about thread destructionRichard Braun
2017-09-07Use accessors when referring to global kernel objectsRichard Braun
The kernel_map/kernel_pmap/kernel_task/etc... names were reused as they were in the Mach source code. They've been a (mostly harmless) long-standing violation of the coding rules.
2017-09-07kern/thread: fix thread stack guard selectionRichard Braun
2017-09-06Use new thread_check_intr_context function consistentlyRichard Braun
2017-09-05x86/{pmap,tcb}: don't use tsd for the update oplistRichard Braun
2017-09-02Rework the build systemRichard Braun
2017-09-02kern/thread: new preemption control macrosRichard Braun
These new macros take care of disabling/restoring interrupts in the appropriate order.
2017-09-02Make assert have no side effectsRichard Braun
This makes sure symbols referenced by assert uses may not be generated if unused. The recently introduced __unused macro is used to suppress compiler warnings resulting from this change.
2017-08-31kern/thread: fix atomic accesses to a thread's run queueRichard Braun
2017-08-27Add TODO entriesRichard Braun
2017-08-27kern/thread: add the thread_delay functionRichard Braun
2017-08-27kern/thread: implement timed sleepsRichard Braun
2017-08-27kern/clock: new moduleRichard Braun
2017-08-25kern/thread: add a stack debugging assertion on schedulingRichard Braun
2017-08-23kern/thread: really fix terminationRichard Braun
Change the semantics of thread_join so that it not only waits for thread_exit but also for the last reference to be dropped.
2017-08-21kern/thread: fix and improve terminationRichard Braun
2017-07-30kern/thread: replace the reaper with deferred worksRichard Braun
2017-07-21Merge branch 'adaptive_spinning'Richard Braun
2017-07-21kern/mutex: new adaptive spinning mutex implementationAgustina Arzille
2017-07-13kern/thread: fix thread stack guard supportRichard Braun
Since the introduction of the kernel VM object, page referencing has become more strict, preventing the thread stack guard code to function. Work around the issue by keeping the physical pages at the stack boundaries.
2017-07-13Switch to initialization operationsRichard Braun
2017-06-25Use the C11 alignas and noreturn macrosRichard Braun
2017-06-25Remove the param moduleRichard Braun
Move the page properties into the new x86/page module, and the virtual memory layout macros into the x86/pmap module.
2017-06-24Move the HZ macro to the kern/thread moduleRichard Braun
2017-06-24Move the DATA_ALIGN and TEXT_ALIGN macros to the x86/cpu moduleRichard Braun
2017-06-24Break STACK_SIZE macro into 3 different macrosRichard Braun
2017-06-24Make shell command descriptions consistentRichard Braun
2017-06-15kern/thread: prevent stack tracing running threads.Richard Braun
2017-06-14x86: improve TCB load and context switchRichard Braun
2017-06-11Make the diagnostics shell optionalRichard Braun
2017-06-10kern/shell: new SHELL_REGISTER_CMDS macroRichard Braun
2017-06-03kern/thread: improve thread_wakeup robustnessRichard Braun
2017-05-31kern/{task,thread}: add the task_info and thread_trace shell commandsRichard Braun
2017-05-30Move assert.h to the include directoryRichard Braun
This turns assert.h into a standard header.
2017-05-16x86/trap: add interrupt stacksAgustina Arzille
2017-05-10kern/thread: remove memory barrierRichard Braun
The flag operations already use atomic accessors, making the barrier irrelevant.
2017-05-09Replace sequential consistency with more efficient ordersAgustina Arzille
2017-04-29kern/thread: include stdint.hRichard Braun