summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/threadqops.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* score: Delete Thread_Scheduler_control::own_nodeSebastian Huber2016-11-021-5/+5
| | | | Update #2556.
* score: Add _Thread_Scheduler_remove_wait_node()Sebastian Huber2016-11-021-2/+4
| | | | Update #2556.
* score: Add _Thread_Scheduler_add_wait_node()Sebastian Huber2016-11-021-4/+1
| | | | Update #2556.
* score: Add _Scheduler_Node_get_scheduler()Sebastian Huber2016-11-021-1/+1
| | | | Update #2556.
* score: Fix warningSebastian Huber2016-09-271-0/+2
|
* score: Scheduler node awareness for thread queuesSebastian Huber2016-09-211-254/+713
| | | | | | | | Maintain the priority of a thread for each scheduler instance via the thread queue enqueue, extract, priority actions and surrender operations. This replaces the primitive priority boosting. Update #2556.
* score: Rework thread priority managementSebastian Huber2016-09-211-186/+661
| | | | | | | | | | | | | | | | | | | | | | | | | Add priority nodes which contribute to the overall thread priority. The actual priority of a thread is now an aggregation of priority nodes. The thread priority aggregation for the home scheduler instance of a thread consists of at least one priority node, which is normally the real priority of the thread. The locking protocols (e.g. priority ceiling and priority inheritance), rate-monotonic period objects and the POSIX sporadic server add, change and remove priority nodes. A thread changes its priority now immediately, e.g. priority changes are not deferred until the thread releases its last resource. Replace the _Thread_Change_priority() function with * _Thread_Priority_perform_actions(), * _Thread_Priority_add(), * _Thread_Priority_remove(), * _Thread_Priority_change(), and * _Thread_Priority_update(). Update #2412. Update #2556.
* score: Introduce _Thread_Get_priority()Sebastian Huber2016-09-081-2/+2
| | | | Avoid direct access to thread internal data fields.
* score: Move thread wait node to scheduler nodeSebastian Huber2016-09-081-20/+53
| | | | Update #2556.
* score: Optimize thread queue enqueueSebastian Huber2016-09-081-17/+32
| | | | Optimize the enqueue to empty thread queue case.
* score: Introduce thread queue surrender operationSebastian Huber2016-08-111-8/+71
| | | | | | This is an optimization for _Thread_queue_Surrender(). It helps to encapsulate the priority boosting in the priority inheritance thread queue operations.
* score: Add debug support to red-black treesSebastian Huber2016-08-081-0/+1
| | | | This helps to detect double insert and extract errors.
* score: Fix and simplify thread wait locksSebastian Huber2016-08-031-50/+16
| | | | | | | | | | There was a subtile race condition in _Thread_queue_Do_extract_locked(). It must first update the thread wait flags and then restore the default thread wait state. In the previous implementation this could lead under rare timing conditions to an ineffective _Thread_Wait_tranquilize() resulting to a corrupt system state. Update #2556.
* score: Turn thread lock into thread wait lockSebastian Huber2016-07-271-17/+46
| | | | | | | | | The _Thread_Lock_acquire() function had a potentially infinite run-time due to the lack of fairness at atomic operations level. Update #2412. Update #2556. Update #2765.
* score: Priority inherit thread queue operationsSebastian Huber2016-07-271-3/+75
| | | | | | | | | Move the priority change due to priority interitance to the thread queue enqueue operation to simplify the locking on SMP configurations. Update #2412. Update #2556. Update #2765.
* score: Simplify _Thread_queue_Boost_priority()Sebastian Huber2016-07-271-11/+15
| | | | | | | | | | Raise the priority under thread queue lock protection and omit the superfluous thread queue priority change, since the thread is extracted anyway. The unblock operation will pick up the new priority. Update #2412. Update #2556. Update #2765.
* score: Add debug support to chainsSebastian Huber2016-07-221-0/+1
| | | | | | | This helps to detect * double insert, append, prepend errors, and * get from empty chain errors.
* score: Use _RBTree_Insert_inline()Sebastian Huber2016-05-201-6/+22
| | | | | | Use _RBTree_Insert_inline() for priority thread queues. Update #2556.
* score: Fix warningSebastian Huber2015-11-041-1/+1
| | | | Close #2454.
* score: Implement priority boostingSebastian Huber2015-09-041-0/+22
|
* score: Implement SMP-specific priority queueSebastian Huber2015-09-041-9/+61
|
* score: Optimize thread queue first operationSebastian Huber2015-09-021-5/+10
| | | | | In case the thread queue heads exist, then the queue is not empty. See _Thread_queue_First_locked().
* rbtree: Add _RBTree_Minimum(), _RBTree_Maximum()Sebastian Huber2015-08-311-1/+1
|
* score: Introduce Thread_queue_HeadsSebastian Huber2015-07-231-23/+124
| | | | | | | | | | | | | Move the storage for the thread queue heads to the threads. Each thread provides a set of thread queue heads allocated from a dedicated memory pool. In case a thread blocks on a queue, then it lends its heads to the queue. In case the thread unblocks, then it takes a free set of threads from the queue. Since a thread can block on at most one queue this works. This mechanism is used in FreeBSD. The motivation for this change is to reduce the memory demands of the synchronization objects. On a 32-bit uni-processor configuration the Thread_queue_Control size is now 8 bytes, compared to 64 bytes in RTEMS 4.10 (other changes reduced the size as well).
* score: Introduce Thread_queue_QueueSebastian Huber2015-07-231-29/+29
| | | | | | Separate the thread queue heads and lock from the operations. This enables the support for light weight objects which only support one queuing discipline.
* score: New thread queue implementationSebastian Huber2015-05-191-23/+0
| | | | | | | | | Use thread wait flags for synchronization. The enqueue operation is now part of the initial critical section. This is the key change and enables fine grained locking on SMP for objects using a thread queue like semaphores and message queues. Update #2273.
* score: More thread queue operationsSebastian Huber2015-05-191-8/+135
| | | | | | | | | Move thread queue discipline specific operations into Thread_queue_Operations. Use a separate node in the thread control block for the thread queue to make it independent of the scheduler data structures. Update #2273.
* score: Add Thread_queue_OperationsSebastian Huber2015-05-191-0/+56
Replace the Thread_Priority_control with more general Thread_queue_Operations which will be used for generic priority change, timeout, signal and wait queue operations in the future. Update #2273.