summaryrefslogtreecommitdiff
path: root/kern/thread.h
AgeCommit message (Collapse)Author
2017-03-19kern/thread: formally define interrupt contextRichard Braun
2017-03-13kern/thread: reduce the number of real-time priorities to 32Richard Braun
2017-03-04kern/thread: minor changes in commentsRichard Braun
2017-03-04kern/{condition,mutex}: reimplement on top of sleep queuesRichard Braun
2017-03-04kern/{thread,turnstile}: implement priority inheritanceRichard Braun
The new turnstile module provides priority propagation capable sleep queues, tightly coupled with the scheduler, and can be used to implement synchronization facilities with priority inheritance.
2017-03-04kern/sleepq: new moduleRichard Braun
This module provides simple generic sleep queues that can be used to implement higher level synchronization facilities such as mutexes and condition variables.
2017-02-14kern/thread: add reference counterRichard Braun
Counting thread references seems unavoidable for the near-future changes that are currently brewing.
2017-02-13kern/thread: minor change about scheduling class string representationRichard Braun
2017-02-13kern/thread: minor global priority reworkRichard Braun
2017-02-08kern/thread: add wait channelsRichard 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.
2017-02-01kern/thread: introduce global prioritiesRichard Braun
2017-01-31kern/thread: make priority a generic thread propertyRichard Braun
2017-01-29kern/thread: implement thread_setschedulerRichard Braun
2017-01-29kern/thread: rename "time-sharing" to "fair-scheduling"Richard Braun
2017-01-24kern/thread: add the THREAD_KERNEL_PREFIX macroRichard Braun
This macro is used to build kernel thread names.
2017-01-23kern/thread: move private definitions to thread_i.hRichard Braun
2016-12-09Force brackets around one-line conditional statementsRichard Braun
This change was done using astyle, with a few manual editing here and there.
2015-05-15kern/thread: add compiler barriers to llsync-related functionsRichard Braun
2014-10-09kern/thread: minor changeRichard Braun
Remove comment.
2014-09-16kern/task: make task_info report thread statesRichard Braun
2014-09-09kern/task: make task_info report scheduling propertiesRichard Braun
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-06-18kern/thread: support thread_sleep without interlockRichard Braun
The thread_sleep function takes a spin lock as a parameter. This lock is used as an interlock allowing either the thread waking up or the thread being awaken to run. But when threads don't need a lock to provide that guarantee, the interlock is only overhead. This change makes thread_sleep assume disabling preemption is used as a synchronization mechanism when the interlock is NULL.
2014-06-10kern/llsync: rework lockless synchronizationRichard Braun
Use a global checkpoint identifier as a generation counter and remove reset interrupts. For some reason I can't remember, using reset interrupts was thought to be more efficient, perhaps because accessing a global variable on each checkpoint looked expensive. But it's really not scalable, and a read-mostly global variable can get cached locally and not incur expensive access. In addition, add a decent amount of documentation about the semantics with regard to the rest of the system. Explicitely state that checkpoints are triggered by context switches and that it's not allowed to block inside read-side critical sections. Make periodic events attempt to trigger checkpoints too. Add a thread-local read-side critical section nesting counter so that it can be reliably determined whether the processor is running a read-side critical section or not.
2014-05-13kern/thread: rename thread_tick to thread_tick_intrRichard Braun
2014-05-13kern/thread: count scheduling interruptsRichard Braun
2014-05-06kern/thread: new thread_from_tcb functionRichard Braun
2014-05-06kern/thread: new thread_tsd_{set,get} functionsRichard Braun
These functions allow accessing thread-local variables from a different thread, typically before starting a thread.
2014-04-27kern/thread: implement thread-specific dataRichard Braun
2014-04-26kern/thread: add thread creation attributes accessorsRichard Braun
2014-01-14Rework bootstrappingRichard Braun
Start application processors once the kernel is completely initialized, right before starting the scheduler. This simplifies the procedure with regard to inter-processor pmap updates.
2014-01-03kern/thread: increase the number of real-time prioritiesRichard Braun
2014-01-03Update calls to atomic operationsRichard Braun
Make spin locks and mutexes encode their state on an int rather than a long.
2013-06-01kern/thread: update creation attributes handlingRichard Braun
Make passing attributes and passing a thread name mandatory.
2013-06-01kern/thread: slightly rework scheduler invocationRichard Braun
Rename THREAD_RESCHEDULE to THREAD_YIELD and thread_reschedule to thread_yield for better clarity, and add the thread_schedule inline function that checks for the THREAD_YIELD flag before calling thread_yield (yielding only checks if preemption is enabled).
2013-06-01kern/thread: short comment about thread lockingRichard Braun
2013-06-01kern/thread: minor naming changeRichard Braun
Refer to scheduling class data instead of context.
2013-05-19kern/thread: implement processor affinityRichard Braun
Processor affinity can be set before a thread is created, but currently not changed afterwards.
2013-05-15kern/thread: describe thread_sleep memory barrier semanticsRichard Braun
2013-05-12kern/thread: update kernel thread naming rulesRichard Braun
2013-05-12kern/thread: minor name change in struct thread_attrRichard Braun
Rename sched_policy to policy.
2013-04-15kern/thread: thread destructionRichard Braun
2013-04-08kern/thread: rework thread state handlingRichard Braun
In order to implement synchronization primitives, the thread_sleep and thread_wakeup functions are changed so that a thread waiting for an event can be reliably awaken, without ever missing a wakeup request.
2013-04-08kern/thread: rework bootstrappingRichard Braun
Instead of using idler threads to provide thread context during bootstrap, use a fake "booter" thread. This makes the creation of idler threads easier because they're not (even partially) used while being initialized when interrupts occur.
2013-03-17kern/thread: document schedulingRichard Braun
2013-03-16kern/thread: rename and move the on_rq thread memberRichard Braun
Change the name for consistency, move it for better alignment.
2013-03-16kern/thread: scale thread weights on timer frequencyRichard Braun
This prevents switching from one round to the next (and in turn round balancing) happening too frequently (or infrequently) when the timer frequency is increased (or decreased).
2013-03-16kern/thread: make thread_schedule privateRichard Braun
2013-03-15kern/thread: remove the unused cpu thread memberRichard Braun