summaryrefslogtreecommitdiffstats
path: root/cpukit/score/include/rtems/score/thread.h (unfollow)
Commit message (Collapse)AuthorFilesLines
2018-01-25Remove make preinstallChris Johns1-935/+0
A speciality of the RTEMS build system was the make preinstall step. It copied header files from arbitrary locations into the build tree. The header files were included via the -Bsome/build/tree/path GCC command line option. This has at least seven problems: * The make preinstall step itself needs time and disk space. * Errors in header files show up in the build tree copy. This makes it hard for editors to open the right file to fix the error. * There is no clear relationship between source and build tree header files. This makes an audit of the build process difficult. * The visibility of all header files in the build tree makes it difficult to enforce API barriers. For example it is discouraged to use BSP-specifics in the cpukit. * An introduction of a new build system is difficult. * Include paths specified by the -B option are system headers. This may suppress warnings. * The parallel build had sporadic failures on some hosts. This patch removes the make preinstall step. All installed header files are moved to dedicated include directories in the source tree. Let @RTEMS_CPU@ be the target architecture, e.g. arm, powerpc, sparc, etc. Let @RTEMS_BSP_FAMILIY@ be a BSP family base directory, e.g. erc32, imx, qoriq, etc. The new cpukit include directories are: * cpukit/include * cpukit/score/cpu/@RTEMS_CPU@/include * cpukit/libnetworking The new BSP include directories are: * bsps/include * bsps/@RTEMS_CPU@/include * bsps/@RTEMS_CPU@/@RTEMS_BSP_FAMILIY@/include There are build tree include directories for generated files. The include directory order favours the most general header file, e.g. it is not possible to override general header files via the include path order. The "bootstrap -p" option was removed. The new "bootstrap -H" option should be used to regenerate the "headers.am" files. Update #3254.
2017-11-09posix: Change created_with_explicit_schedulerSebastian Huber1-0/+6
Remove POSIX_API_Control::created_with_explicit_scheduler. Add Thread_Control::was_created_with_inherited_scheduler. This fixes also pthread_getattr_np() for Classic tasks. Update #2514.
2017-09-27score: Rename to _Scheduler_ControlSebastian Huber1-2/+2
Rename struct Scheduler_Control to _Scheduler_Control to allow its use in standard header files, e.g. <pthread.h>. Update #3112.
2017-07-07score: Move processor affinity to Thread_ControlSebastian Huber1-1/+6
Update #3059.
2017-06-14score: Remove rtems_ada_selfSebastian Huber1-4/+0
This task variable is superfluous since we use thread-local storage now. Update #2289.
2017-01-31score: Fix _Thread_Initialize()Sebastian Huber1-0/+3
2017-01-13score: Add _Thread_Set_name()Sebastian Huber1-0/+8
Add configuration option CONFIGURE_MAXIMUM_THREAD_NAME_SIZE. Update #2858.
2016-11-23score: Rename _Thread_queue_Enqueue_critical()Sebastian Huber1-1/+1
Delete unused _Thread_queue_Enqueue() and rename _Thread_queue_Enqueue_critical() to _Thread_queue_Enqueue().
2016-11-09score: Add and use Thread_Control::is_idleSebastian Huber1-0/+2
Update #2797.
2016-11-03score: Conditionally enable thread resource countSebastian Huber1-0/+8
Maintain the thread resource count only in debug configurations. This is a performance optimization for non-debug configurations.
2016-11-02score: Introduce Thread_Scheduler_control::homeSebastian Huber1-11/+2
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-8/+0
Update #2556.
2016-11-02score: Delete Thread_Scheduler_control::nodeSebastian Huber1-11/+6
Update #2556.
2016-11-02score: Delete _Scheduler_Ask_for_help_if_necessarySebastian Huber1-8/+0
Delete Thread_Control::Resource_node. Update #2556.
2016-11-02score: Add new SMP scheduler helping protocolSebastian Huber1-0/+15
Update #2556.
2016-11-02score: Add scheduler node requestsSebastian Huber1-0/+15
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.
2016-11-02score: Add thread scheduler lockSebastian Huber1-0/+5
Update #2556.
2016-11-02rtems: Add rtems_task_iterate()Sebastian Huber1-8/+2
Update #2423.
2016-09-21score: Manage scheduler nodes via thread queuesSebastian Huber1-0/+8
Update #2556.
2016-09-21score: Add scheduler node table for each threadSebastian Huber1-2/+7
Update #2556.
2016-09-21score: Rework thread priority managementSebastian Huber1-48/+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.
2016-09-08score: Move thread wait node to scheduler nodeSebastian Huber1-102/+99
Update #2556.
2016-09-08score: Move scheduler node to own header fileSebastian Huber1-4/+3
This makes it possible to add scheduler nodes to structures defined in <rtems/score/thread.h>. Update #2556.
2016-09-07score: Remove superfluous SMP debug supportSebastian Huber1-8/+0
This information turned out to be useless in the last couple of months.
2016-08-03score: Fix and simplify thread wait locksSebastian Huber1-0/+11
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.
2016-07-27score: Add deadlock detectionSebastian Huber1-0/+6
The mutex objects use the owner field of the thread queues for the mutex owner. Use this and add a deadlock detection to _Thread_queue_Enqueue_critical() for thread queues with an owner. Update #2412. Update #2556. Close #2765.
2016-07-27score: Turn thread lock into thread wait lockSebastian Huber1-80/+45
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-06-30score: Fix thread lock on SMP configurationsSebastian Huber1-2/+14
2016-06-22score: Add thread priority to scheduler nodesSebastian Huber1-16/+0
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.
2016-06-22posix: Rework sporadic server scheduling policySebastian Huber1-1/+1
Instead of lowering the priority in case the initial budget is consumed raise the priority for each new period. Restore the normal priority once the initial budget is consumed. This makes it later easier to combine the high priority phase with temporary priority boosts (e.g. via priority ceiling and inheritance). Use the thread lock to protect the POSIX thread attributes instead of the thread state lock. This makes it easier to change the thread priority and keep the POSIX attributes consistent. Fixes a false positive use of uninitialized variable warning.
2016-06-22posix: Delete POSIX_API_Control::schedparamSebastian Huber1-1/+0
This field was redundant.
2016-06-22posix: Delete POSIX_API_Control::schedpolicySebastian Huber1-1/+0
This field was redundant.
2016-06-02score: Maybe fix _Thread_Lock_acquire()Sebastian Huber1-5/+0
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).
2016-05-26score: Add Status_Control for all APIsSebastian Huber1-5/+0
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: Get rid of mp_id parameterSebastian Huber1-6/+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-0/+1
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-1/+14
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-1/+0
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_Restart_other()Sebastian Huber1-0/+5
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: Add _Thread_Join() and _Thread_Cancel()Sebastian Huber1-9/+0
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: Delete redundant thread life enumsSebastian Huber1-5/+4
This makes it easier to add more states in the future. Update #2555. Update #2626.
2016-05-12posix: Avoid Giant lock for some pthread functionsSebastian Huber1-0/+5
Avoid Giant lock for pthread_getattr_np(), pthread_setschedparam() and pthread_getschedparam(). Replace POSIX threads scheduler lock with thread state lock. Update #2555.
2016-05-12score: Avoid Giant lock _Scheduler_Set_affinity()Sebastian Huber1-0/+1
Update #2555.
2016-05-12score: Use thread state lock for current stateSebastian Huber1-2/+5
In addition protect scheduler of thread by thread state lock. Enables use of scheduler per-instance locks. Update #2555.
2016-05-12rtems: Use thread state lock for signalsSebastian Huber1-0/+1
2016-05-12score: Introduce thread state lockSebastian Huber1-20/+34
Update #2556.
2016-05-04rtems: Remove task variablesSebastian Huber1-34/+0
Update #2494. Update #2555.
2016-05-02score: Delete __RTEMS_STRICT_ORDER_MUTEX__Sebastian Huber1-6/+0
Remove support for strict order mutexes. Close #2124.
2016-04-18score: Use chain iterator for user extensionsSebastian Huber1-0/+7
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-04-06score: Use red-black tree for active MP proxiesSebastian Huber1-2/+4
Update #2555.