summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/threadinitialize.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* score: Add Thread_ConfigurationSebastian Huber2020-02-121-37/+33
| | | | | | | | | Add the Thread_Configuration structure to reduce the parameter count of _Thread_Initialize(). This makes it easier to add more parameters in the future. It simplifies the code generation since most architectures do not have that many registers available for function parameters. Update #3835.
* score: Simplify TLS area allocationSebastian Huber2020-02-121-15/+15
| | | | | | Use the stack area to allocate the TLS area. Update #3835.
* score: Simplify FP context allocationSebastian Huber2020-02-121-22/+17
| | | | | | | | | | | Use the stack area to allocate the FP context. This considerably simplifies the application configuration since the task count no longer influences the configured work space size. With this change the stack space size is overestimated since an FP context for each thread is accounted. Memory constraint applications can use the stack size for fine tuning. Update #3835.
* score: Simplify thread stack freeSebastian Huber2020-02-121-18/+9
| | | | Update #3835.
* score: Simplify thread stack allocationSebastian Huber2020-02-121-15/+14
| | | | | | Remove superfluous Thread_Control::Start::stack member. Update #3835.
* doxygen: Rename Score* groups in RTEMSScore*Sebastian Huber2019-04-041-1/+1
| | | | Update #3706
* Adjust interrupt mode tests for some CPU portsSebastian Huber2019-01-091-1/+3
| | | | | | | In case the robust thread dispatch is enabled by the CPU port, then the interrupt level must not be changed through the task mode. Update #3000.
* Separate task mode checksSebastian Huber2019-01-091-8/+11
| | | | Update #3000.
* score: Static Objects_Information initializationSebastian Huber2018-12-141-3/+3
| | | | | | | | | | | 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.
* score: Rename Objects_Information::sizeSebastian Huber2018-12-071-1/+1
| | | | | | | | Rename Objects_Information::size to Objects_Information::object_size. Change its type from size_t to uint16_t and move it to reduce the size of Objects_Information. Update #3621.
* score: Add thread pin/unpin supportSebastian Huber2018-09-101-1/+1
| | | | | | | | | Add support to temporarily pin a thread to its current processor. This may be used to access per-processor data structures in critical sections with enabled thread dispatching, e.g. a pinned thread is allowed to block. Update #3508.
* score: Remove CPU_set_ControlSebastian Huber2017-10-111-1/+0
| | | | | | Use Processor_mask instead. Update #2514.
* score: Introduce _SMP_Get_online_processors()Sebastian Huber2017-07-071-1/+4
| | | | Update #3059.
* score: Move processor affinity to Thread_ControlSebastian Huber2017-07-071-0/+1
| | | | Update #3059.
* score: Fix warningSebastian Huber2017-02-151-0/+2
|
* score: Add _Thread_queue_Object_nameSebastian Huber2017-01-311-2/+1
| | | | | | | | | | | | | Add the special thread queue name _Thread_queue_Object_name to mark thread queues embedded in an object with identifier. Using the special thread state STATES_THREAD_QUEUE_WITH_IDENTIFIER is not reliable for this purpose since the thread wait information and thread state are protected by different SMP locks in separate critical sections. Remove STATES_THREAD_QUEUE_WITH_IDENTIFIER. Add and use _Thread_queue_Object_initialize(). Update #2858.
* score: Fix _Thread_Initialize()Sebastian Huber2017-01-311-2/+2
|
* score: Delete _CPU_Context_Fp_start()Sebastian Huber2017-01-261-1/+0
| | | | | | | | | | Since the FP area pointer is passed by reference in _CPU_Context_Initialize_fp() the optional FP area adjustment via _CPU_Context_Fp_start() is superfluous. It is also wrong with respect to memory management, e.g. pointer passed to _Workspace_Free() may be not the one returned by _Workspace_Allocate(). Close #1400.
* score: Restrict task interrupt level to 0 on SMPSebastian Huber2016-11-181-2/+8
| | | | Update #2811.
* rtems: Add scheduler processor add/removeSebastian Huber2016-11-101-1/+8
| | | | Update #2797.
* score: Introduce Thread_Scheduler_control::homeSebastian Huber2016-11-021-2/+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-2/+1
| | | | Update #2556.
* score: Delete Thread_Scheduler_control::nodeSebastian Huber2016-11-021-1/+0
| | | | Update #2556.
* score: Delete _Scheduler_Ask_for_help_if_necessarySebastian Huber2016-11-021-2/+0
| | | | | | Delete Thread_Control::Resource_node. Update #2556.
* score: Add scheduler node requestsSebastian Huber2016-11-021-0/+4
| | | | | | | 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/+1
| | | | Update #2556.
* score: Simplify ISR lock nameSebastian Huber2016-09-271-4/+1
|
* score: Manage scheduler nodes via thread queuesSebastian Huber2016-09-211-0/+5
| | | | Update #2556.
* score: Add scheduler node table for each threadSebastian Huber2016-09-211-11/+60
| | | | Update #2556.
* score: Rework thread priority managementSebastian Huber2016-09-211-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | 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: Remove superfluous SMP debug supportSebastian Huber2016-09-071-2/+0
| | | | This information turned out to be useless in the last couple of months.
* 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-1/+1
| | | | | | | | | | 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-6/+4
| | | | | | | | | 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: Change scheduler node init and destroySebastian Huber2016-07-011-3/+6
| | | | | | 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: Fix thread lock on SMP configurationsSebastian Huber2016-06-301-1/+5
|
* score: Add thread priority to scheduler nodesSebastian Huber2016-06-221-3/+1
| | | | | | | | | | | | | | | | | | 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: Simplify _Thread_Life_action_handler()Sebastian Huber2016-05-201-2/+0
| | | | | | | | Use _Thread_Change_life_locked() to avoid duplicated code. Avoid Giant lock in _Thread_Life_action_handler(). Update #2555. Update #2626.
* score: Introduce thread state lockSebastian Huber2016-05-121-0/+2
| | | | Update #2556.
* score: Delete __RTEMS_STRICT_ORDER_MUTEX__Sebastian Huber2016-05-021-5/+0
| | | | | | Remove support for strict order mutexes. Close #2124.
* score: Fix multiprocessing thread proxiesSebastian Huber2016-03-291-3/+1
| | | | | | | We must provide thread queue heads for the thread wait information for each thread proxy (thread queue heads were introduced by d7665823b208daefb6855591d808e1f3075cedcb). The thread proxy must be allocated before the enqueue operation.
* posix: Use per-thread lookup tree for POSIX KeysSebastian Huber2016-03-181-4/+3
| | | | | | Yields higher performance on SMP systems. Close #2625.
* score: Replace watchdog handler implementationSebastian Huber2016-03-041-0/+4
| | | | | | | | | Use a red-black tree instead of delta chains. Close #2344. Update #2554. Update #2555. Close #2606.
* score: Initialize thread control to zeroSebastian Huber2015-12-151-44/+9
| | | | This reduces the code size of the thread initialization.
* score: Untangle thread actionsSebastian Huber2015-12-111-4/+1
| | | | | | | 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.
* score: Implement SMP-specific priority queueSebastian Huber2015-09-041-2/+2
|
* score: Use a plain ticket lock for thread locksSebastian Huber2015-07-301-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.
* score: Add potpourri lock statisticsSebastian Huber2015-07-301-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.
* score: Introduce Thread_queue_HeadsSebastian Huber2015-07-231-2/+22
| | | | | | | | | | | | | 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).
* Remove use ticks for statistics configure option.Joel Sherrill2015-06-151-5/+1
| | | | | | | | | | This was obsolete and broken based upon recent time keeping changes. Thie build option was previously enabled by adding USE_TICKS_FOR_STATISTICS=1 to the configure command line. This propagated into the code as preprocessor conditionals using the __RTEMS_USE_TICKS_FOR_STATISTICS__ conditional.