Author: bonefish Date: 2011-06-09 02:27:32 +0200 (Thu, 09 Jun 2011) New Revision: 42065 Changeset: https://dev.haiku-os.org/changeset/42065 Modified: haiku/branches/developer/bonefish/signals/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/pthread_once/6-1.c Log: test(): Moved once_ctl initialization into the loop. The test would otherwise fail, if the loop was executed more than once, because init_ctl is reset at the beginning of the loop, but once_ctl wasn't. Modified: haiku/branches/developer/bonefish/signals/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/pthread_once/6-1.c =================================================================== --- haiku/branches/developer/bonefish/signals/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/pthread_once/6-1.c 2011-06-08 23:06:55 UTC (rev 42064) +++ haiku/branches/developer/bonefish/signals/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/pthread_once/6-1.c 2011-06-09 00:27:32 UTC (rev 42065) @@ -181,7 +181,6 @@ void * test( void * arg ) { int ret = 0; - pthread_once_t once_ctl = PTHREAD_ONCE_INIT; /* We don't block the signals SIGUSR1 and SIGUSR2 for this THREAD */ ret = pthread_sigmask( SIG_UNBLOCK, &usersigs, NULL ); @@ -194,6 +193,8 @@ while ( do_it ) { + pthread_once_t once_ctl = PTHREAD_ONCE_INIT; + count_ope++; init_ctl = 0;