summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/include/rtems/posix/pthreadimpl.h (unfollow)
Commit message (Collapse)AuthorFilesLines
2018-01-25Remove make preinstallChris Johns1-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.
2017-11-09posix: Remove POSIX_API_Control::schedpolicySebastian Huber1-0/+4
Use the thread CPU budget algorithm to determine the scheduler policy. This fixes also pthread_getschedparam() for Classic tasks. Update #2514.
2017-10-17posix: Remove POSIX_API_Control::schedparamSebastian Huber1-2/+2
Move sporadic server scheduler parameters to POSIX_API_Control::Sporadic. Remove redundant scheduler priority parameter. Update #2514.
2017-10-17score: Rename _Watchdog_Per_CPU_insert_monotonic()Sebastian Huber1-1/+1
Rename _Watchdog_Per_CPU_insert_monotonic() in _Watchdog_Per_CPU_insert_ticks(). Update #3117. Update #3182.
2017-10-17score: Rename watchdog variantsSebastian Huber1-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.
2017-10-10posix: Unconditional thread attribute supportSebastian Huber1-29/+0
Update #2514.
2017-10-10posix: Constify default thread processor affinitySebastian Huber1-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.
2017-10-09posix: Remove rtems_pthread_attribute_compare()Sebastian Huber1-8/+0
Update #2514. Close #3174.
2017-10-09posix: Simplify POSIX_API_ControlSebastian Huber1-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.
2017-01-11Remove obsolete __RTEMS_HAVE_SYS_CPUSET_H__Joel Sherrill1-1/+1
2016-09-21score: Rework thread priority managementSebastian Huber1-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.
2016-06-22posix: Rework sporadic server scheduling policySebastian Huber1-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.
2016-06-15posix: Fix poradic server initial CPU budgetSebastian Huber1-0/+4
Update #2738.
2016-06-15posix: Use _POSIX_Threads_Sporadic_timer_insert()Sebastian Huber1-1/+14
2016-06-15posix: Remove superfluous codeSebastian Huber1-61/+0
Remove double declarations, useless comments and unused functions.
2016-05-20posix: Rework pthread_join()Sebastian Huber1-14/+0
Rework pthread_join() to use _Thread_Join(). Close #2402. Update #2555. Update #2626. Close #2714.
2016-05-12posix: Avoid Giant lock for some pthread functionsSebastian Huber1-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.
2016-04-12posix: Use a dedicated lock for scheduler changesSebastian Huber1-0/+17
Update #2555.
2016-04-06score: Rework MP thread queue callout supportSebastian Huber1-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.
2016-03-29score: Remove Thread_queue_Queue::operations fieldSebastian Huber1-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.
2016-03-04score: Replace watchdog handler implementationSebastian Huber1-4/+1
Use a red-black tree instead of delta chains. Close #2344. Update #2554. Update #2555. Close #2606.
2016-02-03Use linker set for POSIX User Threads initSebastian Huber1-9/+0
Update #2408.
2016-02-03Optional POSIX Threads initializationSebastian Huber1-8/+1
Update #2408.
2015-07-23score: Introduce Thread_queue_HeadsSebastian Huber1-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).
2014-12-18posix: Delete unused _POSIX_Threads_Get()Sebastian Huber1-34/+0
Close #1759.
2014-07-26Delete unused *_Is_null() functionsSebastian Huber1-16/+0
2014-04-03pthreadimpl.h: Conditionalize thread affinity copyingJoel Sherrill1-1/+1
2014-03-31score: PR2152: Use allocator mutex for objectsSebastian Huber1-16/+5
Use allocator mutex for objects allocate/free. This prevents that the thread dispatch latency depends on the workspace/heap fragmentation.
2014-03-31score: Thread life cycle re-implementationSebastian Huber1-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.
2014-03-21Change all references of rtems.com to rtems.org.Chris Johns1-1/+1
2014-03-07Remove trailing whitespace in previous patchesJennifer Averett1-10/+10
2014-03-07posix: Add POSIX thread affinity attribute support.Jennifer Averett1-1/+68
With the addition of pthread affinity information in pthread_attr_t, the existing code for pthread_attr_t had to be adjusted.
2013-07-26score: Create object implementation headerSebastian Huber1-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.
2013-07-22posix: Create pthread implementation headerSebastian Huber1-18/+47
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.
2013-07-22posix: Include missing header filesSebastian Huber1-0/+1
2013-01-10cpukit: Use Consistent Beginning of Doxygen Group NotationJoel Sherrill1-1/+1
This is the result of a sed script which converts all uses of @{ into a consistent form.
2013-01-10cpukit: Doxygen group fixes and many warnings addressedJoel Sherrill1-1/+1
The output of the modules.html is much improved. Most filesystem and POSIX API related groups are properly nested. Some formatting issues were addressed as were multiple inconsistencies.
2013-01-07posix: Doxygen Clean Up Task #1Alex Ivanov1-65/+68
2012-12-15posix: Doxygen Enhancement Task #2Alex Ivanov1-3/+12
http://www.google-melange.com/gci/task/view/google/gci2012/7988213
2012-12-15posix: Doxygen Enhancement Task #8Mathew Kallada1-1/+7
http://www.google-melange.com/gci/task/view/google/gci2012/8003213
2012-05-11Remove All CVS Id Strings Possible Using a ScriptJoel Sherrill1-2/+0
Script does what is expected and tries to do it as smartly as possible. + remove occurrences of two blank comment lines next to each other after Id string line removed. + remove entire comment blocks which only exited to contain CVS Ids + If the processing left a blank line at the top of a file, it was removed.
2011-12-052011-12-05 Ralf Corsépius <ralf.corsepius@rtems.org>Ralf Corsepius1-0/+8
* posix/include/rtems/posix/pthread.h: Add _POSIX_Threads_Initialize_user_threads_body. * rtems/include/rtems/rtems/tasks.h: Add _RTEMS_tasks_Initialize_user_tasks_body. * sapi/include/confdefs.h: Remove conditional, nested redeclaration of _POSIX_Threads_Initialize_user_threads_body, _RTEMS_tasks_Initialize_user_tasks_body.
2011-06-242011-06-24 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill1-4/+4
* include/rtems/bspIo.h, include/rtems/concat.h, include/rtems/endian.h, include/rtems/fs.h, include/rtems/irq.h, include/rtems/pci.h, include/rtems/userenv.h, libblock/include/rtems/flashdisk.h, libblock/include/rtems/nvdisk-sram.h, libblock/include/rtems/nvdisk.h, libcsupport/include/clockdrv.h, libcsupport/include/console.h, libcsupport/include/iosupp.h, libcsupport/include/spurious.h, libcsupport/include/motorola/mc68230.h, libcsupport/include/rtems/assoc.h, libcsupport/include/rtems/error.h, libcsupport/include/rtems/framebuffer.h, libcsupport/include/rtems/gxx_wrappers.h, libcsupport/include/rtems/libcsupport.h, libcsupport/include/rtems/libio_.h, libcsupport/include/rtems/malloc.h, libcsupport/include/rtems/termiostypes.h, libcsupport/include/sys/statvfs.h, libcsupport/include/sys/termios.h, libcsupport/include/sys/utsname.h, libcsupport/include/zilog/z8036.h, libcsupport/include/zilog/z8530.h, libcsupport/include/zilog/z8536.h, libfs/src/imfs/imfs.h, libfs/src/pipe/pipe.h, libmisc/capture/capture-cli.h, libmisc/capture/capture.h, libmisc/cpuuse/cpuuse.h, libmisc/devnull/devnull.h, libmisc/devnull/devzero.h, libmisc/dumpbuf/dumpbuf.h, libmisc/fb/fb.h, libmisc/fb/mw_uid.h, libmisc/mouse/mouse_parser.h, libmisc/shell/shellconfig.h, libmisc/stringto/stringto.h, libmisc/untar/untar.h, libnetworking/memory.h, posix/include/aio.h, posix/include/mqueue.h, posix/include/semaphore.h, posix/include/rtems/posix/aio_misc.h, posix/include/rtems/posix/barrier.h, posix/include/rtems/posix/cond.h, posix/include/rtems/posix/config.h, posix/include/rtems/posix/key.h, posix/include/rtems/posix/mqueue.h, posix/include/rtems/posix/mutex.h, posix/include/rtems/posix/posixapi.h, posix/include/rtems/posix/priority.h, posix/include/rtems/posix/psignal.h, posix/include/rtems/posix/pthread.h, posix/include/rtems/posix/ptimer.h, posix/include/rtems/posix/rwlock.h, posix/include/rtems/posix/semaphore.h, posix/include/rtems/posix/sigset.h, posix/include/rtems/posix/spinlock.h, posix/include/rtems/posix/threadsup.h, posix/include/rtems/posix/time.h, posix/include/rtems/posix/timer.h, posix/inline/rtems/posix/barrier.inl, posix/inline/rtems/posix/cond.inl, posix/inline/rtems/posix/mqueue.inl, posix/inline/rtems/posix/mutex.inl, posix/inline/rtems/posix/priority.inl, posix/inline/rtems/posix/pthread.inl, posix/inline/rtems/posix/rwlock.inl, posix/inline/rtems/posix/semaphore.inl, posix/inline/rtems/posix/spinlock.inl, posix/inline/rtems/posix/timer.inl, rtems/mainpage.h, rtems/include/rtems/rtems/barrier.h, rtems/include/rtems/rtems/object.h, rtems/include/rtems/rtems/timer.h, rtems/inline/rtems/rtems/barrier.inl, rtems/inline/rtems/rtems/timer.inl, rtems/src/semtranslatereturncode.c, sapi/include/rtems/config.h, sapi/include/rtems/fatal.h, sapi/include/rtems/mptables.h, score/include/rtems/score/object.h, score/include/rtems/score/priority.h, score/inline/rtems/score/object.inl, score/inline/rtems/score/priority.inl: Add @file Doxygen directives and descriptions to files which originated with RTEMS. This improves the file list page generated by Doxygen.
2010-06-152010-06-15 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill1-4/+11
* posix/include/rtems/posix/pthread.h: Improve comments.
2010-06-152010-06-15 Ralf Corsépius <ralf.corsepius@rtems.org>Ralf Corsepius1-3/+3
* posix/include/rtems/posix/pthread.h: Remove stray comment. Work-around doxygen comment bug.
2010-06-142010-06-14 Ralf Corsépius <ralf.corsepius@rtems.org>Ralf Corsepius1-3/+3
* libnetworking/rtems/mkrootfs.h, posix/include/rtems/posix/pthread.h, score/include/rtems/score/coresem.h, score/include/rtems/score/priority.h, score/include/rtems/score/threadq.h, score/include/rtems/score/timestamp.h: Move 'extern "C"'.
2009-11-30Whitespace removal.Ralf Corsepius1-2/+2
2009-06-242009-06-24 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill1-35/+53
* posix/Makefile.am, posix/include/rtems/posix/priority.h, posix/include/rtems/posix/pthread.h, posix/inline/rtems/posix/priority.inl, posix/src/killinfo.c, posix/src/pthread.c, posix/src/pthreadcreate.c, posix/src/pthreadsetschedparam.c: Various modifications to improve binary code coverage analysis. Some of these are to mark code as debug only. Some are to break conditional expressions into multiple lines. Some are to move inline methods that are not time critical into subroutines to make them easier to test. Inlining them multiple times means that their logic paths are spread across multiple methods. This explodes the test cases required. * posix/src/psxpriorityisvalid.c, posix/src/psxtransschedparam.c: New files.
2008-12-172008-12-17 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill1-14/+2
* posix/include/rtems/posix/barrier.h, posix/include/rtems/posix/cond.h, posix/include/rtems/posix/key.h, posix/include/rtems/posix/mqueue.h, posix/include/rtems/posix/mutex.h, posix/include/rtems/posix/psignal.h, posix/include/rtems/posix/pthread.h, posix/include/rtems/posix/ptimer.h, posix/include/rtems/posix/rwlock.h, posix/include/rtems/posix/semaphore.h, posix/include/rtems/posix/spinlock.h, posix/include/rtems/posix/timer.h, posix/src/cond.c, posix/src/key.c, posix/src/mqueue.c, posix/src/mutex.c, posix/src/pbarrier.c, posix/src/prwlock.c, posix/src/psignal.c, posix/src/pspin.c, posix/src/pthread.c, posix/src/pthreadinitthreads.c, posix/src/ptimer.c, posix/src/semaphore.c, sapi/src/posixapi.c: Convert POSIX manager initialization routines to directly pull parameters from configuration table.
2008-09-04Convert to "bool".Ralf Corsepius1-1/+1