diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-09-19 14:10:33 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-10-05 14:29:01 +0200 |
commit | 47b1e31f119a5830976bc16d9495d6ccb27a909a (patch) | |
tree | 5efbb7375c3627999b60c7642b24481b154b3f0e /cpukit/posix/src/pthreadonce.c | |
parent | Enforce compatible Newlib version (diff) | |
download | rtems-47b1e31f119a5830976bc16d9495d6ccb27a909a.tar.bz2 |
posix: Optimize pthread_once_t
Reduce size of pthread_once_t and make it zero-initialized.
Update #3142.
Diffstat (limited to '')
-rw-r--r-- | cpukit/posix/src/pthreadonce.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/cpukit/posix/src/pthreadonce.c b/cpukit/posix/src/pthreadonce.c index dc8a449a87..c92acf8642 100644 --- a/cpukit/posix/src/pthreadonce.c +++ b/cpukit/posix/src/pthreadonce.c @@ -33,8 +33,5 @@ int pthread_once( if ( !once_control || !init_routine ) return EINVAL; - if ( once_control->is_initialized != 1 ) - return EINVAL; - - return _Once( &once_control->init_executed, init_routine ); + return _Once( &once_control->_flags, init_routine ); } |