summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/threadrestart.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2016-11-02score: Introduce Thread_Scheduler_control::homeSebastian Huber1-1/+1
Replace Thread_Scheduler_control::control and Thread_Scheduler_control::own_control with new Thread_Scheduler_control::home. Update #2556.
2016-11-02score: Delete Thread_Scheduler_control::own_nodeSebastian Huber1-1/+1
Update #2556.
2016-11-02score: Add thread scheduler lockSebastian Huber1-0/+1
Update #2556.
2016-09-21score: Rework thread priority managementSebastian Huber1-34/+27
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.
2016-09-08score: Introduce _Thread_Get_priority()Sebastian Huber1-2/+2
Avoid direct access to thread internal data fields.
2016-09-08score: Introduce Thread_queue_Lock_contextSebastian Huber1-1/+1
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.
2016-09-08score: Simplify thread queue acquire/releaseSebastian Huber1-4/+1
2016-08-05score: Simplify _Thread_Finalize_life_change()Sebastian Huber1-7/+1
2016-07-27score: Turn thread lock into thread wait lockSebastian Huber1-2/+1
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.
2016-07-25cpukit: Add and use Watchdog_Discipline.Gedare Bloom1-1/+1
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
2016-07-01score: Change scheduler node init and destroySebastian Huber1-1/+4
Provide the scheduler node to initialize or destroy to the corresponding operations. This makes it possible to have more than one scheduler node per thread.
2016-07-01score: Workaround for #2751Sebastian Huber1-0/+4
The ARM and PowerPC interrupt epilogues call _Thread_Dispatch() with interrupts disabled (counter example: SPARC). On SMP configurations, since inter-processor interrupts set the thread dispatch necessary indicator this prevents a thread dispatch notification in post-switch handlers (which all run with interrupts disabled). On all configurations, this is a serious issue for the interrupt latency. Update #2751
2016-06-16score: Fix thread delete race condition on SMPSebastian Huber1-6/+17
2016-05-30score: _CORE_mutex_Check_dispatch_for_seize()Sebastian Huber1-8/+10
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().
2016-05-30score: Add _Thread_queue_Context_set_MP_callout()Sebastian Huber1-1/+1
Add _Thread_queue_Context_set_MP_callout() to simplify _Thread_queue_Context_initialize(). This makes it possible to more easily add additional fields to Thread_queue_Context.
2016-05-26score: Add Status_Control for all APIsSebastian Huber1-6/+4
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.
2016-05-25score: Move thread queue MP callout to contextSebastian Huber1-14/+17
Drop the multiprocessing (MP) dependent callout parameter from the thread queue extract, dequeue, flush and unblock methods. Merge this parameter with the lock context into new structure Thread_queue_Context. This helps to gets rid of the conditionally compiled method call helpers.
2016-05-25score: Get rid of mp_id parameterSebastian Huber1-1/+0
Get rid of the mp_id parameter used for some thread queue methods. Use THREAD_QUEUE_QUEUE_TO_OBJECT() instead.
2016-05-20posix: Rework thread cancellationSebastian Huber1-3/+3
Add Thread_Life_state::THREAD_LIFE_CHANGE_DEFERRED and rework the POSIX thread cancellation to use the thread life states. Update #2555. Update #2626.
2016-05-20posix: Rework pthread_join()Sebastian Huber1-4/+88
Rework pthread_join() to use _Thread_Join(). Close #2402. Update #2555. Update #2626. Close #2714.
2016-05-20score: Simplify _Thread_Life_action_handler()Sebastian Huber1-65/+29
Use _Thread_Change_life_locked() to avoid duplicated code. Avoid Giant lock in _Thread_Life_action_handler(). Update #2555. Update #2626.
2016-05-20score: Rework _Thread_Cancel()Sebastian Huber1-54/+31
Rework _Thread_Cancel() to use _Thread_Change_life_locked(). Update #2555. Update #2626.
2016-05-20score: Rework _Thread_Restart_other()Sebastian Huber1-9/+79
Rework _Thread_Restart_other() to use _Thread_Change_life_locked(). Cope with concurrent change requests by means of a pending request counter. Update #2555. Update #2626.
2016-05-20score: Split _Thread_Restart()Sebastian Huber1-14/+82
Split _Thread_Restart() into _Thread_Restart_self() and _Thread_Restart_other(). Move content of existing _Thread_Restart_self() into new _Thread_Restart_self(). Avoid Giant lock for thread restart. _Thread_Restart_self() is a no-return function and used by _Thread_Global_construction(). Update #2555. Update #2626.
2016-05-20score: Add _Thread_Join() and _Thread_Cancel()Sebastian Huber1-20/+61
Split _Thread_Close() into _Thread_Join() and _Thread_Cancel() to prepare for a re-use in pthread_join() and pthread_cancel(). Update #2555. Update #2626.
2016-05-20score: Rework _Thread_Exit()Sebastian Huber1-4/+16
Rework _Thread_Exit() to use _Thread_Change_life_locked(). Update #2555. Update #2626.
2016-05-20score: Add _Thread_Raise_real_priority()Sebastian Huber1-14/+16
Update #2555. Update #2626.
2016-05-20score: Add Thread_Change_life()Sebastian Huber1-39/+56
Add _Thread_Change_life_locked() as a general function to alter the thread life state. Use it to implement _Thread_Set_life_protection() as a first step. Update #2555. Update #2626.
2016-05-20score: Delete unused variableSebastian Huber1-6/+3
Update #2555. Update #2626.
2016-05-20score: Avoid superfluous life protectionSebastian Huber1-3/+0
Disable thread dispatching is enough to prevent deletion of the executing thread. There is no need for an additional life protection. Update #2555. Update #2626.
2016-05-20score: Add _Thread_Exit()Sebastian Huber1-4/+14
The goal is to make _Thread_Exit() a no-return function in follow up patches. Update #2555. Update #2626.
2016-05-12score: Introduce thread state lockSebastian Huber1-18/+26
Update #2556.
2016-04-18score: Use chain iterator for user extensionsSebastian Huber1-0/+2
Add a lock and use a chain iterator for safe iteration during concurrent user extension addition and removal. Ensure that dynamically added thread delete and fatal extensions are called in reverse order. Update #2555. Update #2692.
2016-03-23score: Add and use RTEMS_UNREACHABLESebastian Huber1-4/+2
2016-03-18posix: Use per-thread lookup tree for POSIX KeysSebastian Huber1-0/+1
Yields higher performance on SMP systems. Close #2625.
2016-03-18score: Destroy thread timer lockSebastian Huber1-4/+1
Update #2554.
2016-03-04score: Replace watchdog handler implementationSebastian Huber1-4/+8
Use a red-black tree instead of delta chains. Close #2344. Update #2554. Update #2555. Close #2606.
2016-01-11score: Introduce Thread_Entry_informationSebastian Huber1-6/+4
This avoids potential dead code in _Thread_Handler(). It gets rid of the dangerous function pointer casts. Update #2514.
2015-12-11score: Untangle thread actionsSebastian Huber1-2/+13
Remove the thread action handler parameter from _Thread_Action_initialize() and instead set it later in _Thread_Add_post_switch_action(). This avoids a dependency on the thread action handler via the thread initialization.
2015-07-30score: Use a plain ticket lock for thread locksSebastian Huber1-1/+2
This enables external libraries to use thread locks since they are independent of the actual RTEMS build configuration, e.g. profiling enabled or disabled.
2015-07-30score: Add potpourri lock statisticsSebastian Huber1-0/+1
These SMP lock statistics are used for all lock objects that lack a storage space for the statistics. Examples are lock objects used in external libraries which are independent of the actual RTEMS build configuration.
2015-07-23score: Introduce Thread_queue_HeadsSebastian Huber1-4/+9
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).
2015-05-19score: Rework _Thread_Change_priority()Sebastian Huber1-12/+34
Move the writes to Thread_Control::current_priority and Thread_Control::real_priority into _Thread_Change_priority() under the protection of the thread lock. Add a filter function to _Thread_Change_priority() to enable specialized variants. Avoid race conditions during a thread priority restore with the new Thread_Control::priority_restore_hint for an important average case optimizations used by priority inheritance mutexes. Update #2273.
2015-05-19score: Add header to _Watchdog_Remove()Sebastian Huber1-2/+2
Add watchdog header parameter to _Watchdog_Remove() to be in line with the other operations. Add _Watchdog_Remove_ticks() and _Watchdog_Remove_seconds() for convenience. Update #2307.
2015-03-24score: Add thread lockSebastian Huber1-0/+4
Update #2273.
2015-03-05score: Simplify and fix signal deliverySebastian Huber1-1/+0
Deliver the POSIX signals after the thread state was updated to avoid race-conditions on SMP configurations. Update #2273.
2014-06-23score: Fix thread deletion on SMPSebastian Huber1-5/+5
Close the thread object in _Thread_Make_zombie() so that all blocking operations that use _Thread_Get() in the corresponding release directive can find a terminating thread and can complete the operation.
2014-06-04score: Replace _Scheduler_Allocate/Free()Sebastian Huber1-1/+1
Replace _Scheduler_Allocate() with _Scheduler_Node_initialize(). Remove the return status and thus the node initialization must be always successful. Rename _Scheduler_Free() to _Scheduler_Node_destroy().
2014-06-03score: Add and use _Thread_Owns_resources()Sebastian Huber1-1/+1
2014-05-21score: _Thread_Set_life_protection()Sebastian Huber1-4/+0
Enable usage of _Thread_Set_life_protection() in thread dispatch critical sections. This can be used to enable the thread life-protection with thread dispatching disabled and then enable thread dispatching.