From 47b1e31f119a5830976bc16d9495d6ccb27a909a Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 19 Sep 2017 14:10:33 +0200 Subject: posix: Optimize pthread_once_t Reduce size of pthread_once_t and make it zero-initialized. Update #3142. --- cpukit/posix/src/pthreadonce.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'cpukit/posix') 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 ); } -- cgit v1.2.3