summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/include/rtems/posix/pthreadimpl.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Remove make preinstallChris Johns2018-01-251-129/+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.
* posix: Remove POSIX_API_Control::schedpolicySebastian Huber2017-11-091-0/+4
| | | | | | | Use the thread CPU budget algorithm to determine the scheduler policy. This fixes also pthread_getschedparam() for Classic tasks. Update #2514.
* posix: Remove POSIX_API_Control::schedparamSebastian Huber2017-10-171-2/+2
| | | | | | | | Move sporadic server scheduler parameters to POSIX_API_Control::Sporadic. Remove redundant scheduler priority parameter. Update #2514.
* score: Rename _Watchdog_Per_CPU_insert_monotonic()Sebastian Huber2017-10-171-1/+1
| | | | | | | | Rename _Watchdog_Per_CPU_insert_monotonic() in _Watchdog_Per_CPU_insert_ticks(). Update #3117. Update #3182.
* score: Rename watchdog variantsSebastian Huber2017-10-171-1/+1
| | | | | | | | | | | Rename PER_CPU_WATCHDOG_RELATIVE in PER_CPU_WATCHDOG_MONOTONIC to highlight the corresponding POSIX CLOCK_MONOTONIC. Rename PER_CPU_WATCHDOG_ABSOLUTE in PER_CPU_WATCHDOG_REALTIME to highlight the corresponding POSIX CLOCK_REALTIME. Update #3117. Update #3182.
* posix: Unconditional thread attribute supportSebastian Huber2017-10-101-29/+0
| | | | Update #2514.
* posix: Constify default thread processor affinitySebastian Huber2017-10-101-1/+1
| | | | | | | | Set default thread processor affinity to all processors of the pre-allocated set. This allows to constify the _POSIX_Threads_Default_attributes. Update #2514.
* posix: Remove rtems_pthread_attribute_compare()Sebastian Huber2017-10-091-8/+0
| | | | | Update #2514. Close #3174.
* posix: Simplify POSIX_API_ControlSebastian Huber2017-10-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Return stack area via pthread_getattr_np(). Simplify * pthread_attr_setaffinity_np(), and * pthread_attr_getaffinity_np() and let the scheduler do the more sophisticated error checks. Make * pthread_setaffinity_np(), * pthread_getaffinity_np(), * pthread_attr_setaffinity_np(), and * pthread_attr_getaffinity_np() available in all configurations. Update #2514. Close #3145. Close #3168.
* Remove obsolete __RTEMS_HAVE_SYS_CPUSET_H__Joel Sherrill2017-01-111-1/+1
|
* 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.