summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/src/pthread.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* posix: Fix poradic server initial CPU budgetSebastian Huber2016-06-151-4/+1
| | | | Update #2738.
* posix: Use _POSIX_Threads_Sporadic_timer_insert()Sebastian Huber2016-06-151-7/+1
|
* posix: Rework thread cancellationSebastian Huber2016-05-201-7/+0
| | | | | | | | 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-45/+6
| | | | | | | | | 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-7/+4
| | | | | | | | Avoid Giant lock for pthread_getattr_np(), pthread_setschedparam() and pthread_getschedparam(). Replace POSIX threads scheduler lock with thread state lock. Update #2555.
* score: Simplify _Objects_Initialize_information()Sebastian Huber2016-04-211-4/+0
| | | | | | Remove unused supports_global parameter. Convert _Objects_Initialize_information() to a macro to avoid use of RTEMS_MULTIPROCESSING define for each caller.
* posix: Use a dedicated lock for scheduler changesSebastian Huber2016-04-121-24/+41
| | | | Update #2555.
* score: Remove Thread_queue_Queue::operations fieldSebastian Huber2016-03-291-3/+4
| | | | | | | | | 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-13/+18
| | | | | | | | | Use a red-black tree instead of delta chains. Close #2344. Update #2554. Update #2555. Close #2606.
* Delete unused API extensionsSebastian Huber2016-02-031-1/+0
|
* Use linker set for POSIX User Threads initSebastian Huber2016-02-031-24/+0
| | | | Update #2408.
* Optional POSIX Cleanup initializationSebastian Huber2016-02-031-15/+1
| | | | Update #2408.
* Optional POSIX Threads initializationSebastian Huber2016-02-031-1/+10
| | | | Update #2408.
* posix: Store unblocked signalsSebastian Huber2015-12-151-3/+1
| | | | | Store the unblock signals to exploit the zero-initialization of the thread control block.
* score: Initialize thread control to zeroSebastian Huber2015-12-151-7/+3
| | | | This reduces the code size of the thread initialization.
* score: Untangle thread actionsSebastian Huber2015-12-111-5/+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.
* posix: Require struct _pthread_cleanup_contextSebastian Huber2015-11-241-4/+0
| | | | | This structure is available in Newlib since 2013-11-29 (Git commit a534dfd26e765047621acd0eda656ded886e7108).
* basdefs.h: Add and use RTEMS_UNUSEDSebastian Huber2015-10-261-2/+2
|
* score: Rename _POSIX_Absolute_timeout_to_ticks()Sebastian Huber2015-07-281-1/+0
| | | | | | Rename _POSIX_Absolute_timeout_to_ticks() to _TOD_Absolute_timeout_to_ticks() and move it to the score directory. Delete empty <rtems/posix/time.h>.
* score: Introduce Thread_queue_HeadsSebastian Huber2015-07-231-4/+2
| | | | | | | | | | | | | 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).
* score: Add _Watchdog_Preinitialize()Sebastian Huber2015-06-131-0/+1
| | | | | | Add an assert to ensure that the watchdog is the proper state for a _Watchdog_Initialize(). This helps to detect invalid initializations which may lead to a corrupt watchdog chain.
* score: Rework _Thread_Change_priority()Sebastian Huber2015-05-191-46/+50
| | | | | | | | | | | | | 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.
* score: Delete Thread_queue_Control::timeout_statusSebastian Huber2015-05-191-5/+1
| | | | | Use a parameter for _Thread_queue_Enqueue() instead to reduce memory usage.
* score: Add Thread_queue_Control::LockSebastian Huber2015-05-191-0/+2
| | | | | | | | | | | Move the complete thread queue enqueue procedure into _Thread_queue_Enqueue_critical(). It is possible to use the thread queue lock to protect state of the object embedding the thread queue. This enables per object fine grained locking in the future. Delete _Thread_queue_Enter_critical_section(). Update #2273.
* score: Add header to _Watchdog_Remove()Sebastian Huber2015-05-191-1/+1
| | | | | | | | 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.
* score: Delete Thread_queue_Control::stateSebastian Huber2015-04-231-1/+0
| | | | | Use a parameter for _Thread_queue_Enqueue() instead to reduce memory usage.
* score: Add and use _Thread_Owns_resources()Sebastian Huber2014-06-031-2/+2
|
* score: Simplify thread control initializationSebastian Huber2014-04-151-22/+3
| | | | | | | | | | | The thread control block contains fields that point to application configuration dependent memory areas, like the scheduler information, the API control blocks, the user extension context table, the RTEMS notepads and the Newlib re-entrancy support. Account for these areas in the configuration and avoid extra workspace allocations for these areas. This helps also to avoid heap fragementation and reduces the per thread memory due to a reduced heap allocation overhead.
* pthread.c: Conditionalize thread affinity initializationJoel Sherrill2014-04-031-1/+1
|
* posix: Modified pthread init to use cpuset default.Jennifer Averett2014-04-031-12/+8
|
* score: Relax Giant lock usage for API mutexesSebastian Huber2014-03-311-1/+1
| | | | | It is no longer necessary to protect the workspace allocations with the Giant lock due to the thread life cycle re-implementation.
* score: Thread life cycle re-implementationSebastian Huber2014-03-311-7/+15
| | | | | | | | | | | | | | | | | | | 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.
* score: Fix thread restart extensions contextSebastian Huber2014-03-311-1/+10
| | | | | Run the thread restart extensions in the context of the restarted thread. Run them with thread dispatching enabled.
* posix: Use thread action for signalsSebastian Huber2014-03-311-0/+5
|
* Change all references of rtems.com to rtems.org.Chris Johns2014-03-211-1/+1
|
* POSIX keys now enabled in all configurations.Joel Sherrill2014-03-071-9/+1
| | | | | | | Formerly POSIX keys were only enabled when POSIX threads were enabled. Because they are a truly safe alternative to per-task variables in an SMP system, they are being enabled in all configurations.
* Remove trailing whitespace in previous patchesJennifer Averett2014-03-071-1/+1
|
* posix: Add POSIX thread affinity attribute support.Jennifer Averett2014-03-071-11/+41
| | | | | With the addition of pthread affinity information in pthread_attr_t, the existing code for pthread_attr_t had to be adjusted.
* pthread.c: Use UINT32_MAX rather than constant valueJoel Sherrill2013-12-091-1/+1
|
* pthread.c: Remove XXX and use SIGNAL_ constantsJoel Sherrill2013-12-091-5/+3
|
* posix: Use cleanup contexts on the stackSebastian Huber2013-12-021-0/+4
| | | | | | | | | | Provide support for latest Newlib <pthread.h> change. The cleanup contexts are stored on the thread stack. This is conformant with the POSIX requirements for the pthread_cleanup_push() and pthread_cleanup_pop() statement pair. Passing an invalid pointer as the routine to pthread_cleanup_push() is now a usage error and the behaviour is undefined.
* posix: Create key implementation headerSebastian Huber2013-08-061-1/+1
| | | | | | Move implementation specific parts of key.h and key.inl into new header file keyimpl.h. The key.h contains now only the application visible API.
* Unlimited objects support for POSIX keysZhongwei Yao2013-08-061-0/+3
| | | | | | | This patch enables unlimited model in POSIX key manger and have a decent runtime on POSIX key searching, adding and deleting operations. Memory overhead is lower than current implementation when the size of key and key value becomes big.
* score: Create threadq implementation headerSebastian Huber2013-07-261-1/+1
| | | | | | | | Move implementation specific parts of tqdata.h, threadq.h and threadq.inl into new header file threadqimpl.h. The threadq.h contains now only the application visible API. Delete tqdata.h.
* score: Create thread implementation headerSebastian Huber2013-07-261-1/+1
| | | | | | | | Move implementation specific parts of thread.h and thread.inl into new header file threadimpl.h. The thread.h contains now only the application visible API. Remove superfluous header file includes from various files.
* score: Create watchdog implementation headerSebastian Huber2013-07-221-0/+1
| | | | | | Move implementation specific parts of watchdog.h and watchdog.inl into new header file watchdogimpl.h. The watchdog.h contains now only the application visible API.
* posix: Create pthread implementation headerSebastian Huber2013-07-221-1/+1
| | | | | | 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.
* posix: Create priority implementation headerSebastian Huber2013-07-221-1/+1
| | | | | | Move implementation specific parts of priority.h and priority.inl into new header file priorityimpl.h. Remove priority.h since there is no application visible API.
* posix: Include missing header filesSebastian Huber2013-07-221-0/+1
|
* posix: Doxygen Enhancement Task #8Mathew Kallada2012-12-151-0/+7
| | | | http://www.google-melange.com/gci/task/view/google/gci2012/8003213