summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/src/pthread.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* posix: Add signal post switch extension on the flySebastian Huber2012-12-051-5/+0
|
* posix: Add and use <rtems/posix/psignalimpl.h>Sebastian Huber2012-12-051-1/+1
| | | | | This file contains the parts of <rtems/posix/psignal.h> that are only necessary for the POSIX API implementation.
* score: Add API extensions post switch listSebastian Huber2012-12-051-4/+7
| | | | | | | | Move post switch hook from API_extensions_Control to new API_extensions_Post_switch_control. Rename _API_extensions_Run_postswitch() in _API_extensions_Run_post_switch(). Add _API_extensions_Post_switch_list and _API_extensions_Add_post_switch().
* score: Add and use <rtems/score/userextimpl.h>Sebastian Huber2012-11-221-1/+1
| | | | | This file contains the parts of <rtems/score/userext.h> that are only necessary for the RTEMS implementation.
* Remove All CVS Id Strings Possible Using a ScriptJoel Sherrill2012-05-111-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-05 Ralf Corsépius <ralf.corsepius@rtems.org>Ralf Corsepius2011-12-051-1/+1
| | | | * posix/src/pthread.c: Fix typos.
* 2011-12-03 Ralf Corsépius <ralf.corsepius@rtems.org>Ralf Corsepius2011-12-031-5/+6
| | | | | | | | | * posix/src/pthread.c (_POSIX_Threads_Default_attributes): Add missing initializer. * posix/src/pthread.c: Make _POSIX_Threads_Create_extension,_POSIX_Threads_Delete_extension, _POSIX_Threads_Exitted_extension, _POSIX_Threads_Initialize_user_threads static.
* 2011-07-31 Joel Sherrill <joel.sherrilL@OARcorp.com>Joel Sherrill2011-07-311-1/+1
| | | | | | | | | PR 1855/cpukit * posix/src/psignal.c, posix/src/pthread.c, posix/src/pthreadjoin.c: Correct signal processing during pthread_join. We are supposed to unblock the thread waiting on a pthread_join(), dispatch the signal handler, account for it potentially overwriting errno, and then have the thread return to blocking within pthread_join().
* 2011-07-27 Joel Sherrill <joel.sherrilL@OARcorp.com>Joel Sherrill2011-07-271-1/+1
| | | | | * posix/src/pthread.c, posix/src/pthreadjoin.c: Revert accidental commit.
* 2011-07-27 Petr Benes <benesp16@fel.cvut.cz>Joel Sherrill2011-07-271-1/+1
| | | | | | PR 1856/cpukit * posix/src/pthread.c, posix/src/pthreadjoin.c, score/src/rbtreeextract.c: Do not derefence NULL.
* 2011-02-15 Joel Sherrill <joel.sherrilL@OARcorp.com>Joel Sherrill2011-02-161-1/+1
| | | | | | | | | | | | * libmisc/capture/capture.c, posix/src/keyfreememory.c, posix/src/pthread.c, score/include/rtems/score/wkspace.h, score/src/objectextendinformation.c, score/src/objectnamespaceremove.c, score/src/objectsetname.c, score/src/threadclose.c, score/src/threadinitialize.c, score/src/wkspace.c: Many places were checking for a NULL pointer before calling _Workspace_Free. By moving the check into _Workspace_Free, we eliminate a number of conditional paths and make it harder to return a NULL pointer.
* 2010-10-04 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2010-10-041-0/+3
| | | | | | | * Makefile.am, configure.ac, posix/Makefile.am, posix/src/pthread.c: * posix/src/pthreadattrgetguardsize.c, posix/src/pthreadattrgetstack.c, posix/src/pthreadattrsetguardsize.c, posix/src/pthreadattrsetstack.c: New files.
* 2010-04-25 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2010-04-251-4/+9
| | | | | | * posix/src/pthread.c: Make default pthread_attr_t match the conditionals in the version in newlib. This way it will always be right.
* Reflect POSIX sched_parm changes.Ralf Corsepius2010-04-031-9/+9
|
* 2009-09-26 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2009-09-261-2/+2
| | | | | | * libmisc/capture/capture.c, posix/src/pthread.c, rtems/src/tasks.c, score/include/rtems/score/userext.h: Eliminate use of deprecated rtems_extension. Re-add prototype for _User_extensions_Add_API_set.
* 2009-08-19 Joel Sherrill <joel.sherrill@OARcorp.com>Joel Sherrill2009-08-191-57/+53
| | | | | | | | * posix/src/pthread.c: Address sporadic server edge cases. Do not change priority if thread is holding a priority ceiling or inheritance mutex. Do not change it if it looks like the thread has manually changed its priority. Style cleanup on file with new comments added.
* 2009-08-01 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2009-08-011-6/+2
| | | | | | | * posix/src/psxtransschedparam.c, posix/src/pthread.c: Add error checks for 0 time on sporadic scheduler replenish period and initial budget. This avoids having to correct for it in the TSR, so we can eliminate the check for ticks == 0 there.
* 2009-07-03 Joel Sherrill <joel.sherrill@OARcorp.com>Joel Sherrill2009-07-031-1/+3
| | | | | | | * itron/src/task.c, posix/src/pthread.c, rtems/src/tasks.c, sapi/src/exinit.c, score/include/rtems/score/apiext.h, score/src/apiext.c: No APIs currently implemented use the predriver_hook so disable it until such time as it is used.
* 2009-06-29 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2009-06-291-1/+0
| | | | | | | | * posix/src/killinfo.c, posix/src/mutexinit.c, posix/src/psignal.c, posix/src/psignalchecksignal.c, posix/src/pthread.c, posix/src/pthreadexit.c, posix/src/pthreadinitthreads.c: Remove includes of <assert.h> where possible. Make other uses conditional on ifdef RTEMS_DEBUG.
* 2009-06-24 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2009-06-241-2/+7
| | | | | | | | | | | | | | | * 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.