summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
* posix: Prevent pthread_setspecific from returning EAGAIN.Christian Mauderer2014-03-241-24/+35
| | | | | | | | The man-page for pthread_setspecific does not define the EAGAIN return value. Further without this patch it was not possible to set keys that have been already set a new value. Add test for setting a new value to a already set key.
* score: Unify pthread and gxx_wrapper once and move to score.Christian Mauderer2014-03-211-35/+2
|
* Change all references of rtems.com to rtems.org.Chris Johns2014-03-21228-228/+228
|
* posix: Use interal mutex for once implementationSebastian Huber2014-03-192-74/+22
| | | | | | Enable pthread_once() for all configurations. The pthread_once() function is one means to initialize POSIX keys. Another use case is the C++ support.
* score: Add SMP lock profiling supportSebastian Huber2014-03-141-1/+1
|
* posix: Fix NULL pointer access in pthread_create()Sebastian Huber2014-03-111-2/+2
|
* score: Add local context to SMP lock APISebastian Huber2014-03-114-15/+15
| | | | | | | | | | | Add a local context structure to the SMP lock API for acquire and release pairs. This context can be used to store the ISR level and profiling information. It may be later used to enable more sophisticated lock algorithms, e.g. MCS locks. There is only one lock that cannot be used with a local context. This is the per-CPU lock since here we would have to transfer the local context through a context switch which is very complicated.
* sapi: Use one SMP lock for all chainsSebastian Huber2014-03-112-15/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This partially reverts commit 1215fd4d9426a59d568560e9a485628560363133. In order to support profiling of SMP locks and provide a future compatible SMP locks API it is necessary to add an SMP lock destroy function. Since the commit above adds an SMP lock to each chain control we would have to add a rtems_chain_destroy() function as well. This complicates the chain usage dramatically. Thus revert the patch above. A global SMP lock for all chains is used to implement the protected chain operations. Advantages: * The SAPI chain API is now identical on SMP and non-SMP configurations. * The size of the chain control is reduced and is then equal to the Score chains. * The protected chain operations work correctly on SMP. Disadvantage: * Applications using many different chains and the protected operations may notice lock contention. The chain control size drop is a huge benefit (SAPI chain controls are 66% larger than the Score chain controls). The only disadvantage is not really a problem since these applications can use specific interrupt locks and unprotected chain operations to avoid this issue.
* posix: Fix NULL pointer access in pthread_create()Sebastian Huber2014-03-101-1/+1
|
* POSIX keys now enabled in all configurations.Joel Sherrill2014-03-074-26/+17
| | | | | | | 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-075-11/+11
|
* posix: Add pthread_getattr_np().Jennifer Averett2014-03-071-0/+57
| | | | | This is a useful POSIX thread API helper which is found in `GNU/Linux and *BSD.
* posix: Add dynamic pthread get and set affinity.Jennifer Averett2014-03-072-0/+137
| | | | | | | This patch adds the following methods: + pthread_get_affinity_np + pthread_set_affinity_np
* posix: Add pthread_attr_t methods to get/set affinity.Jennifer Averett2014-03-072-0/+102
| | | | | | | This patch adds the following methods: + pthread_attr_get_affinity_np + pthread_attr_set_affinity_np
* posix: Add support method to compare two pthread attribute structures.Jennifer Averett2014-03-071-0/+92
|
* posix: Add POSIX thread affinity attribute support.Jennifer Averett2014-03-073-15/+61
| | | | | With the addition of pthread affinity information in pthread_attr_t, the existing code for pthread_attr_t had to be adjusted.
* posix: Set pthread attribute values in detach and setschedparm methods.Jennifer Averett2014-02-192-0/+4
|
* posix/*.c: Remove use of register keywordJoel Sherrill2014-02-0313-26/+26
|
* posix: fix race condition between pthread_create and capture engineTill Strauman2014-01-091-0/+5
| | | | | | Reproducable crashes occur when using pthreads and the capture engine at the same time. 'pthread_create()' is the culprit. It creates a SCORE thread and then calls Thread_Start( ) without disabling thread-dispatching.
* alarm.c: Use _Assert() not assert()Joel Sherrill2013-12-101-1/+1
|
* alarm.c: Per comment add debug code for kill() failingJoel Sherrill2013-12-091-4/+17
| | | | | This is highly unlikely and would indicate a serious bug in the system or corruption. But it is better to be cautious.
* pthread.c: Use UINT32_MAX rather than constant valueJoel Sherrill2013-12-091-1/+1
|
* condwaitsupp.c: Return EPERM if waiting and mutex is not lockedJoel Sherrill2013-12-091-4/+8
| | | | | | This error check was commented out because it is not in the POSIX specification. However, the GNU/Linux manual page does document that EPERM is to be returned in this situation.
* pthread.c: Remove XXX and use SIGNAL_ constantsJoel Sherrill2013-12-091-5/+3
|
* pspin.c: Comment clean upJoel Sherrill2013-12-091-16/+7
|
* pbarrier.c: Comment clean upJoel Sherrill2013-12-091-16/+7
|
* cpukit/rtems: Remove XXX in commentsJoel Sherrill2013-12-091-2/+2
|
* posix: Use cleanup contexts on the stackSebastian Huber2013-12-024-13/+101
| | | | | | | | | | 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 timers: Add restrict keywordSahil Patnayakuni2013-11-292-4/+4
| | | | | + timer_create() + timer_settime()
* signal methods: Add restrict keywordBryan Dunsmore2013-11-296-13/+13
|
* score/rbtree: Remove "unprotected" from APISebastian Huber2013-11-214-8/+8
|
* Fix building with RTEMS_DEBUG.Chris Johns2013-09-301-3/+17
|
* _execve.c: Fix missing prototype warningsJoel Sherrill2013-09-221-1/+7
|
* semopen.c: Switch to using RTEMS_COMPILER_UNUSED_ATTRIBUTEJoel Sherrill2013-09-221-11/+8
|
* mqueueopen.c: Switch to using RTEMS_COMPILER_UNUSED_ATTRIBUTEJoel Sherrill2013-09-221-11/+8
|
* semopen.c: Address set but unused variable warningJoel Sherrill2013-09-211-0/+9
|
* sigsuspend.c: Address set but unused variable warningJoel Sherrill2013-09-211-3/+6
|
* mqueueopen.c: Address set but unused variable warningJoel Sherrill2013-09-211-0/+10
|
* sapi: SMP support for chainsSebastian Huber2013-08-302-21/+29
| | | | | | | | Add ISR lock to chain control for proper SMP protection. Replace rtems_chain_extract() with rtems_chain_explicit_extract() and rtems_chain_insert() with rtems_chain_explicit_insert() on SMP configurations. Use rtems_chain_explicit_extract() and rtems_chain_explicit_insert() to provide SMP support.
* posix: Avoid NULL pointer accessSebastian Huber2013-08-281-3/+5
|
* posix: Add and use _POSIX_signals_Acquire()Sebastian Huber2013-08-275-15/+33
| | | | | | Add and use _POSIX_signals_Release(). The post-switch handler is not protected by disabled thread dispatching. Use proper SMP lock for signal management.
* posix: _POSIX_signals_Clear_process_signals()Sebastian Huber2013-08-271-28/+11
| | | | Do not disable interrupts since the caller did this already.
* posix: Protect access to _POSIX_signals_VectorsSebastian Huber2013-08-271-11/+6
| | | | | Assume the sigaction() is called only from thread context. Protect against concurrent sigaction() invocations by different threads.
* score: _Thread_queue_Enqueue_with_handler()Sebastian Huber2013-08-233-3/+7
| | | | | Add thread parameter to _Thread_queue_Enqueue_with_handler() to avoid access to global _Thread_Executing.
* posix: Update to the pthread_once changes.Chris Johns2013-08-233-25/+25
| | | | | | Implement the reeview changes. Add a POSIX Fatal error domain. Fix confdefs.h to correctly handle the internal POSIX mutexes.
* posix: Change pthread_once to be SMP safe.Chris Johns2013-08-142-10/+89
| | | | | | | | | | Change pthread_once from using disabled pre-emption to using a pthread mutex making it SMP safe. GCC using a posix threading model uses pthread_once. The pthread mutex requires at least 1 mutex is configured so confdefs.h has been updated to account for the internal mutex.
* posix: Handle recursive attributes correctly.Chris Johns2013-08-141-1/+1
| | | | | | The recursive field in the pthread_mutexattr_t is now not used. The code in pthread_mutexattr_settype only sets the type field and not the recursive field.
* posix: Delete POSIX_Keys_Freechain typeSebastian Huber2013-08-084-63/+62
| | | | | | Use the POSIX configuration value directly. Use right type early and avoid casts. Use proper unlimited objects API. Check workspace allocation. Make functions static.
* posix: Use _Objects_Put() for POSIX keysSebastian Huber2013-08-063-10/+15
|
* posix: Create key implementation headerSebastian Huber2013-08-069-57/+29
| | | | | | 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.