summaryrefslogtreecommitdiffstats
path: root/cpukit/score/include/rtems/score/threadimpl.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* score: Rename to _Scheduler_ControlSebastian Huber2017-09-271-1/+1
| | | | | | | Rename struct Scheduler_Control to _Scheduler_Control to allow its use in standard header files, e.g. <pthread.h>. Update #3112.
* score: Move _Thread_Scheduler_ask_for_help()Sebastian Huber2017-02-031-2/+0
| | | | | Move _Thread_Scheduler_ask_for_help(), rename it to _Thread_Ask_for_help() and make it static.
* score: Add _Thread_Set_name()Sebastian Huber2017-01-131-0/+5
| | | | | | Add configuration option CONFIGURE_MAXIMUM_THREAD_NAME_SIZE. Update #2858.
* score: Add and use _Thread_Get_name()Sebastian Huber2017-01-131-1/+7
| | | | Update #2858.
* score: Initialize thread queue context earlySebastian Huber2016-12-021-3/+0
| | | | | | | | Initialize thread queue context early preferably outside the critical section. Remove implicit _Thread_queue_Context_initialize() from _Thread_Wait_acquire().
* score: Add thread queue enqueue calloutSebastian Huber2016-11-231-1/+10
| | | | | | | Replace the expected thread dispatch disable level with a thread queue enqueue callout. This enables the use of _Thread_Dispatch_direct() in the thread queue enqueue procedure. This avoids impossible exection paths, e.g. Per_CPU_Control::dispatch_necessary is always true.
* score: Conditionally enable thread resource countSebastian Huber2016-11-031-0/+10
| | | | | Maintain the thread resource count only in debug configurations. This is a performance optimization for non-debug configurations.
* score: Introduce thread resource count methodsSebastian Huber2016-11-031-0/+14
| | | | | This makes it easier to conditionally enable/disable the thread resource count usage.
* score: Introduce Thread_Scheduler_control::homeSebastian Huber2016-11-021-0/+12
| | | | | | | | Replace Thread_Scheduler_control::control and Thread_Scheduler_control::own_control with new Thread_Scheduler_control::home. Update #2556.
* score: Delete Thread_Scheduler_control::own_nodeSebastian Huber2016-11-021-12/+1
| | | | Update #2556.
* score: Second part of new MrsP implementationSebastian Huber2016-11-021-0/+7
| | | | Update #2556.
* score: Delete _Scheduler_Ask_for_help_if_necessarySebastian Huber2016-11-021-17/+2
| | | | | | Delete Thread_Control::Resource_node. Update #2556.
* score: First part of new MrsP implementationSebastian Huber2016-11-021-0/+11
| | | | Update #2556.
* score: Add new SMP scheduler helping protocolSebastian Huber2016-11-021-0/+24
| | | | Update #2556.
* score: Add _Thread_Scheduler_process_requests()Sebastian Huber2016-11-021-0/+2
| | | | Update #2556.
* score: Add scheduler node requestsSebastian Huber2016-11-021-1/+46
| | | | | | | Add the ability to add/remove scheduler nodes to/from the set of scheduler nodes available to the schedulers for a particular thread. Update #2556.
* score: Add thread scheduler lockSebastian Huber2016-11-021-0/+16
| | | | Update #2556.
* score: Add _Thread_Scheduler_remove_wait_node()Sebastian Huber2016-11-021-0/+9
| | | | Update #2556.
* score: Add _Thread_Scheduler_add_wait_node()Sebastian Huber2016-11-021-0/+13
| | | | Update #2556.
* rtems: Add rtems_task_iterate()Sebastian Huber2016-11-021-0/+7
| | | | Update #2423.
* score: Scheduler node awareness for thread queuesSebastian Huber2016-09-211-8/+37
| | | | | | | | 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: Add scheduler node table for each threadSebastian Huber2016-09-211-1/+17
| | | | Update #2556.
* score: Rework thread priority managementSebastian Huber2016-09-211-94/+167
| | | | | | | | | | | | | | | | | | | | | | | | | 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-0/+18
| | | | Avoid direct access to thread internal data fields.
* score: Add scheduler node implementation headerSebastian Huber2016-09-081-0/+1
| | | | Update #2556.
* score: Move thread wait node to scheduler nodeSebastian Huber2016-09-081-6/+0
| | | | Update #2556.
* score: Introduce Thread_queue_Lock_contextSebastian Huber2016-09-081-35/+45
| | | | | | Introduce Thread_queue_Lock_context to contain the context necessary for thread queue lock and thread wait lock acquire/release operations to reduce the Thread_Control size.
* score: Simplify thread queue acquire/releaseSebastian Huber2016-09-081-4/+6
|
* score: Remove superfluous SMP debug supportSebastian Huber2016-09-071-13/+0
| | | | This information turned out to be useless in the last couple of months.
* score: Fix and simplify thread wait locksSebastian Huber2016-08-031-63/+72
| | | | | | | | | | 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-212/+306
| | | | | | | | | 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-31/+0
| | | | | | | | | 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: Split _Thread_Change_priority()Sebastian Huber2016-07-271-0/+10
| | | | | | Update #2412. Update #2556. Update #2765.
* score: FormatSebastian Huber2016-07-261-7/+6
|
* cpukit: Add and use Watchdog_Discipline.Gedare Bloom2016-07-251-4/+7
| | | | | | | | | Clock disciplines may be WATCHDOG_RELATIVE, WATCHDOG_ABSOLUTE, or WATCHDOG_NO_TIMEOUT. A discipline of WATCHDOG_RELATIVE with a timeout of WATCHDOG_NO_TIMEOUT is equivalent to a discipline of WATCHDOG_NO_TIMEOUT. updates #2732
* score: Next try to fix thread lock on SMPSebastian Huber2016-07-011-6/+16
|
* score: Avoid atomic fences for thread wait flagsSebastian Huber2016-06-301-12/+30
| | | | | The use of atomic fences is brittle and may break due to changes in different areas which is hard to manage.
* score: Fix thread lock on SMP configurationsSebastian Huber2016-06-301-8/+26
|
* score: Fix SMP message handlingSebastian Huber2016-06-291-14/+2
| | | | | | | | According to the C11 standard only atomic read-modify-write operations guarantee that the last value written in modification order is read, see "7.17.3 Order and consistency". Thus we must use a read-modify-write in _SMP_Inter_processor_interrupt_handler() to make sure we read an up-to-date message.
* score: Add thread priority to scheduler nodesSebastian Huber2016-06-221-0/+5
| | | | | | | | | | | | | | | | | | The thread priority is manifest in two independent areas. One area is the user visible thread priority along with a potential thread queue. The other is the scheduler. Currently, a thread priority update via _Thread_Change_priority() first updates the user visble thread priority and the thread queue, then the scheduler is notified if necessary. The priority is passed to the scheduler via a local variable. A generation counter ensures that the scheduler discards out-of-date priorities. This use of a local variable ties the update in these two areas close together. For later enhancements and the OMIP locking protocol implementation we need more flexibility. Add a thread priority information block to Scheduler_Node and synchronize priority value updates via a sequence lock on SMP configurations. Update #2556.
* score: Maybe fix _Thread_Lock_acquire()Sebastian Huber2016-06-021-37/+7
| | | | | | | The approach with the generation number was broken. The load/store of the current lock, the thread queue and the thread queue operations were not properly synchronized. Under certain conditions on a PowerPC T4240 old thread queue operations operated on a new thread queue (NULL pointer).
* score: Fix _Thread_Lock_acquire()Sebastian Huber2016-06-011-11/+12
| | | | | | | | | A read-modify-write operation is necessary to read the last value written. See for example C11 standard or Power ISA 2.07, Book II: Power ISA Virtual Environment Architecture, Section 1.6.3 Memory Coherence Required [Category: Memory Coherence] and Section 1.7.3 Atomic Update.
* score: _CORE_mutex_Check_dispatch_for_seize()Sebastian Huber2016-05-301-4/+4
| | | | | | | | | | | Move the safety check performed by _CORE_mutex_Check_dispatch_for_seize() out of the performance critical path and generalize it. Blocking on a thread queue with an unexpected thread dispatch disabled level is illegal in all system states. Add the expected thread dispatch disable level (which may be 1 or 2 depending on the operation) to Thread_queue_Context and use it in _Thread_queue_Enqueue_critical().
* score: Add Status_Control for all APIsSebastian Huber2016-05-261-14/+8
| | | | | | | | | | | Unify the status codes of the Classic and POSIX API to use the new enum Status_Control. This eliminates the Thread_Control::Wait::timeout_code field and the timeout parameter of _Thread_queue_Enqueue_critical() and _MPCI_Send_request_packet(). It gets rid of the status code translation tables and instead uses simple bit operations to get the status for a particular API. This enables translation of status code constants at compile time. Add _Thread_Wait_get_status() to avoid direct access of thread internal data structures.
* score: Move thread queue object supportSebastian Huber2016-05-251-20/+0
|
* mpci: Fix thread queue flush methodSebastian Huber2016-05-251-0/+19
| | | | | | | We must call the MP callout for proxies if we unblock them after a thread queue extraction. This was missing in _Thread_queue_Flush_critical(). Move thread remove timer and unblock code to new function _Thread_Remove_timer_and_unblock().
* Replace *_Get_interrupt_disable() with *_Get()Sebastian Huber2016-05-201-1/+1
| | | | | Uniformly use *_Get() to get an object by identifier with a lock context.
* score: Rename _Objects_Get_local()Sebastian Huber2016-05-201-1/+1
| | | | | | Rename _Objects_Get_local() into _Objects_Get(). Confusions with the previous _Objects_Get() function are avoided since the Objects_Locations parameter is gone.
* score: Rename _ISR_Disable() and _ISR_Enable()Sebastian Huber2016-05-201-1/+1
| | | | | | | | | Rename _ISR_Disable() into _ISR_Local_disable(). Rename _ISR_Enable() into _ISR_Local_enable(). Remove _Debug_Is_owner_of_giant(). This is a preparation to remove the Giant lock. Update #2555.
* score: Rename _ISR_Disable_without_giant()Sebastian Huber2016-05-201-2/+2
| | | | | | | | | Rename _ISR_Disable_without_giant() into _ISR_Local_disable(). Rename _ISR_Enable_without_giant() into _ISR_Local_enable(). This is a preparation to remove the Giant lock. Update #2555.