diff options
author | Chris Johns <chrisj@rtems.org> | 2013-08-23 14:56:36 +1000 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2013-08-23 14:56:36 +1000 |
commit | 6e4c01e3a2c07d3d42c510fbff70c14ccbafd2df (patch) | |
tree | ec6d62205983fabb345a6d84cd50804265fe3349 /cpukit/posix/src/pthreadonce.c | |
parent | bsps/arm: Add more CP15 cache functions (diff) | |
download | rtems-6e4c01e3a2c07d3d42c510fbff70c14ccbafd2df.tar.bz2 |
posix: Update to the pthread_once changes.
Implement the reeview changes.
Add a POSIX Fatal error domain.
Fix confdefs.h to correctly handle the internal POSIX mutexes.
Diffstat (limited to 'cpukit/posix/src/pthreadonce.c')
-rw-r--r-- | cpukit/posix/src/pthreadonce.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cpukit/posix/src/pthreadonce.c b/cpukit/posix/src/pthreadonce.c index 2b02f1e53c..aa8afe7bf4 100644 --- a/cpukit/posix/src/pthreadonce.c +++ b/cpukit/posix/src/pthreadonce.c @@ -29,7 +29,7 @@ #define PTHREAD_ONCE_INIT_NOT_RUN 0 #define PTHREAD_ONCE_INIT_RUNNING 1 -#define PTHREAD_ONCE_INIT_RUN 2 +#define PTHREAD_ONCE_INIT_COMPLETE 2 int pthread_once( pthread_once_t *once_control, @@ -44,7 +44,7 @@ int pthread_once( if ( once_control->is_initialized != 1 ) return EINVAL; - if ( once_control->init_executed != PTHREAD_ONCE_INIT_RUN ) { + if ( once_control->init_executed != PTHREAD_ONCE_INIT_COMPLETE ) { r = pthread_mutex_lock( &_POSIX_Once_Lock ); if ( r == 0 ) { int rr; @@ -61,7 +61,7 @@ int pthread_once( case PTHREAD_ONCE_INIT_NOT_RUN: once_control->init_executed = PTHREAD_ONCE_INIT_RUNNING; (*init_routine)(); - once_control->init_executed = PTHREAD_ONCE_INIT_RUN; + once_control->init_executed = PTHREAD_ONCE_INIT_COMPLETE; break; case PTHREAD_ONCE_INIT_RUNNING: r = EINVAL; |