summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/include/rtems/posix/pthreadimpl.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* score: Rework thread priority managementSebastian Huber2016-09-211-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | 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.
* posix: Rework sporadic server scheduling policySebastian Huber2016-06-221-16/+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.
* posix: Fix poradic server initial CPU budgetSebastian Huber2016-06-151-0/+4
| | | | Update #2738.
* posix: Use _POSIX_Threads_Sporadic_timer_insert()Sebastian Huber2016-06-151-1/+14
|
* posix: Remove superfluous codeSebastian Huber2016-06-151-61/+0
| | | | Remove double declarations, useless comments and unused functions.
* posix: Rework pthread_join()Sebastian Huber2016-05-201-14/+0
| | | | | | | | | Rework pthread_join() to use _Thread_Join(). Close #2402. Update #2555. Update #2626. Close #2714.
* posix: Avoid Giant lock for some pthread functionsSebastian Huber2016-05-121-17/+0
| | | | | | | | Avoid Giant lock for pthread_getattr_np(), pthread_setschedparam() and pthread_getschedparam(). Replace POSIX threads scheduler lock with thread state lock. Update #2555.
* posix: Use a dedicated lock for scheduler changesSebastian Huber2016-04-121-0/+17
| | | | Update #2555.
* score: Rework MP thread queue callout supportSebastian Huber2016-04-061-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The thread queue implementation was heavily reworked to support SMP. This broke the multiprocessing support of the thread queues. This is fixed by this patch. A thread proxy is unblocked due to three reasons 1) timeout, 2) request satisfaction, and 3) extraction. In case 1) no MPCI message must be sent. This is ensured via the _Thread_queue_MP_callout_do_nothing() callout set during _Thread_MP_Allocate_proxy(). In case 2) and 3) an MPCI message must be sent. In case we interrupt the blocking operation during _Thread_queue_Enqueue_critical(), then this message must be sent by the blocking thread. For this the new fields Thread_Proxy_control::thread_queue_callout and Thread_Proxy_control::thread_queue_id are used. Delete the individual API MP callout types and use Thread_queue_MP_callout throughout. This type is only defined in multiprocessing configurations. Prefix the multiprocessing parameters with mp_ to ease code review. Multiprocessing specific parameters are optional due to use of a similar macro pattern. There is no overhead for non-multiprocessing configurations.
* score: Remove Thread_queue_Queue::operations fieldSebastian Huber2016-03-291-0/+12
| | | | | | | | | Remove the Thread_queue_Queue::operations field to reduce the size of this structure. Add a thread queue operations parameter to the _Thread_queue_First(), _Thread_queue_First_locked(), _Thread_queue_Enqueue(), _Thread_queue_Dequeue() and _Thread_queue_Flush() functions. This is a preparation patch to reduce the size of several synchronization objects.
* score: Replace watchdog handler implementationSebastian Huber2016-03-041-4/+1
| | | | | | | | | Use a red-black tree instead of delta chains. Close #2344. Update #2554. Update #2555. Close #2606.
* Use linker set for POSIX User Threads initSebastian Huber2016-02-031-9/+0
| | | | Update #2408.
* Optional POSIX Threads initializationSebastian Huber2016-02-031-8/+1
| | | | Update #2408.
* score: Introduce Thread_queue_HeadsSebastian Huber2015-07-231-3/+3
| | | | | | | | | | | | | 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).
* posix: Delete unused _POSIX_Threads_Get()Sebastian Huber2014-12-181-34/+0
| | | | Close #1759.
* Delete unused *_Is_null() functionsSebastian Huber2014-07-261-16/+0
|
* pthreadimpl.h: Conditionalize thread affinity copyingJoel Sherrill2014-04-031-1/+1
|
* score: PR2152: Use allocator mutex for objectsSebastian Huber2014-03-311-16/+5
| | | | | Use allocator mutex for objects allocate/free. This prevents that the thread dispatch latency depends on the workspace/heap fragmentation.
* score: Thread life cycle re-implementationSebastian Huber2014-03-311-1/+3
| | | | | | | | | | | | | | | | | | | The thread deletion is now supported on SMP. This change fixes the following PRs: PR1814: SMP race condition between stack free and dispatch PR2035: psxcancel reveals NULL pointer access in _Thread_queue_Extract() The POSIX cleanup handler are now called in the right context (should be called in the context of the terminating thread). http://pubs.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_09.html Add a user extension the reflects a thread termination event. This is used to reclaim the Newlib reentrancy structure (may use file operations), the POSIX cleanup handlers and the POSIX key destructors.
* Change all references of rtems.com to rtems.org.Chris Johns2014-03-211-1/+1
|
* Remove trailing whitespace in previous patchesJennifer Averett2014-03-071-10/+10
|
* posix: Add POSIX thread affinity attribute support.Jennifer Averett2014-03-071-1/+68
| | | | | With the addition of pthread affinity information in pthread_attr_t, the existing code for pthread_attr_t had to be adjusted.
* score: Create object implementation headerSebastian Huber2013-07-261-0/+1
| | | | | | Move implementation specific parts of object.h and object.inl into new header file objectimpl.h. The object.h contains now only the application visible API.
* posix: Create pthread implementation headerSebastian Huber2013-07-221-0/+229
Move implementation specific parts of pthread.h and pthread.inl into new header file pthreadimpl.h. The pthread.h contains now only the application visible API.