summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/threadrestart.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* doxygen: Rename Score* groups in RTEMSScore*Sebastian Huber2019-04-041-1/+1
| | | | Update #3706
* score: Static Objects_Information initializationSebastian Huber2018-12-141-1/+1
| | | | | | | | | | | Statically allocate the objects information together with the initial set of objects either via <rtems/confdefs.h>. Provide default object informations with zero objects via librtemscpu.a. This greatly simplifies the workspace size estimate. RTEMS applications which do not use the unlimited objects option are easier to debug since all objects reside now in statically allocated objects of the right types. Close #3621.
* posix: Provide threads by defaultSebastian Huber2018-10-291-16/+0
| | | | Update #2514.
* Use _Thread_Dispatch_direct()Sebastian Huber2018-02-081-2/+2
| | | | | | | Use _Thread_Dispatch_direct() for operations that block the executing thread. This ensures that we get a fatal error (INTERNAL_ERROR_BAD_THREAD_DISPATCH_DISABLE_LEVEL) if we try to block in an invalid context, e.g. during system start or an interrupt handler.
* score: Move thread queue timeout handlingSebastian Huber2017-10-241-1/+1
| | | | | Update #3117. Update #3182.
* score: Add optional _CPU_Context_Destroy()Sebastian Huber2017-07-251-1/+1
| | | | Update #3077.
* score: Introduce _Internal_error()Sebastian Huber2016-12-121-1/+1
|
* score: Remove fatal is internal indicatorSebastian Huber2016-12-091-5/+1
| | | | | | | | | The fatal is internal indicator is redundant since the fatal source and error code uniquely identify a fatal error. Keep the fatal user extension is internal parameter for backward compatibility and set it to false always. Update #2825.
* score: Initialize thread queue context earlySebastian Huber2016-12-021-2/+4
| | | | | | | | Initialize thread queue context early preferably outside the critical section. Remove implicit _Thread_queue_Context_initialize() from _Thread_Wait_acquire().
* score: Fix thread queue context initializationSebastian Huber2016-11-281-1/+1
| | | | | Initialize the thread queue context with invalid data in debug configurations to catch missing set up steps.
* score: Optimize _Thread_queue_Enqueue()Sebastian Huber2016-11-241-1/+1
| | | | | | | | | Move thread state for _Thread_queue_Enqueue() to the thread queue context. This reduces the parameter count of _Thread_queue_Enqueue() from five to four (ARM for example has only four function parameter registers). Since the thread state is used after several function calls inside _Thread_queue_Enqueue() this parameter was saved on the stack previously.
* score: Rename _Thread_queue_Enqueue_critical()Sebastian Huber2016-11-231-1/+1
| | | | | Delete unused _Thread_queue_Enqueue() and rename _Thread_queue_Enqueue_critical() to _Thread_queue_Enqueue().
* score: Add thread queue enqueue calloutSebastian Huber2016-11-231-8/+27
| | | | | | | 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: Add and use _Thread_Dispatch_direct()Sebastian Huber2016-11-181-7/+1
| | | | | | | | | | This function is useful for operations which synchronously block, e.g. self restart, self deletion, yield, sleep. It helps to detect if these operations are called in the wrong context. Since the thread dispatch necessary indicator is not used, this is more robust in some SMP situations. Update #2751.
* score: Conditionally enable thread resource countSebastian Huber2016-11-031-0/+2
| | | | | Maintain the thread resource count only in debug configurations. This is a performance optimization for non-debug configurations.
* score: Introduce Thread_Scheduler_control::homeSebastian Huber2016-11-021-1/+1
| | | | | | | | 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-1/+1
| | | | Update #2556.
* score: Add thread scheduler lockSebastian Huber2016-11-021-0/+1
| | | | Update #2556.
* score: Rework thread priority managementSebastian Huber2016-09-211-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.
* score: Introduce _Thread_Get_priority()Sebastian Huber2016-09-081-2/+2
| | | | Avoid direct access to thread internal data fields.
* score: Introduce Thread_queue_Lock_contextSebastian Huber2016-09-081-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.
* score: Simplify thread queue acquire/releaseSebastian Huber2016-09-081-4/+1
|
* score: Simplify _Thread_Finalize_life_change()Sebastian Huber2016-08-051-7/+1
|
* score: Turn thread lock into thread wait lockSebastian Huber2016-07-271-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.
* cpukit: Add and use Watchdog_Discipline.Gedare Bloom2016-07-251-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
* score: Change scheduler node init and destroySebastian Huber2016-07-011-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.
* score: Workaround for #2751Sebastian Huber2016-07-011-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
* score: Fix thread delete race condition on SMPSebastian Huber2016-06-161-6/+17
|
* score: _CORE_mutex_Check_dispatch_for_seize()Sebastian Huber2016-05-301-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().
* score: Add _Thread_queue_Context_set_MP_callout()Sebastian Huber2016-05-301-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.
* score: Add Status_Control for all APIsSebastian Huber2016-05-261-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.
* score: Move thread queue MP callout to contextSebastian Huber2016-05-251-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.
* score: Get rid of mp_id parameterSebastian Huber2016-05-251-1/+0
| | | | | Get rid of the mp_id parameter used for some thread queue methods. Use THREAD_QUEUE_QUEUE_TO_OBJECT() instead.
* posix: Rework thread cancellationSebastian Huber2016-05-201-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.
* posix: Rework pthread_join()Sebastian Huber2016-05-201-4/+88
| | | | | | | | | Rework pthread_join() to use _Thread_Join(). Close #2402. Update #2555. Update #2626. Close #2714.
* score: Simplify _Thread_Life_action_handler()Sebastian Huber2016-05-201-65/+29
| | | | | | | | Use _Thread_Change_life_locked() to avoid duplicated code. Avoid Giant lock in _Thread_Life_action_handler(). Update #2555. Update #2626.
* score: Rework _Thread_Cancel()Sebastian Huber2016-05-201-54/+31
| | | | | | | Rework _Thread_Cancel() to use _Thread_Change_life_locked(). Update #2555. Update #2626.
* score: Rework _Thread_Restart_other()Sebastian Huber2016-05-201-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.
* score: Split _Thread_Restart()Sebastian Huber2016-05-201-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.
* score: Add _Thread_Join() and _Thread_Cancel()Sebastian Huber2016-05-201-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.
* score: Rework _Thread_Exit()Sebastian Huber2016-05-201-4/+16
| | | | | | | Rework _Thread_Exit() to use _Thread_Change_life_locked(). Update #2555. Update #2626.
* score: Add _Thread_Raise_real_priority()Sebastian Huber2016-05-201-14/+16
| | | | | Update #2555. Update #2626.
* score: Add Thread_Change_life()Sebastian Huber2016-05-201-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.
* score: Delete unused variableSebastian Huber2016-05-201-6/+3
| | | | | Update #2555. Update #2626.
* score: Avoid superfluous life protectionSebastian Huber2016-05-201-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.
* score: Add _Thread_Exit()Sebastian Huber2016-05-201-4/+14
| | | | | | | | The goal is to make _Thread_Exit() a no-return function in follow up patches. Update #2555. Update #2626.
* score: Introduce thread state lockSebastian Huber2016-05-121-18/+26
| | | | Update #2556.
* score: Use chain iterator for user extensionsSebastian Huber2016-04-181-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.
* score: Add and use RTEMS_UNREACHABLESebastian Huber2016-03-231-4/+2
|
* posix: Use per-thread lookup tree for POSIX KeysSebastian Huber2016-03-181-0/+1
| | | | | | Yields higher performance on SMP systems. Close #2625.