/third_party/musl/libc-test/src/functionalext/supplement/thread/thread_gtest/ |
H A D | thread_callonce_test.cpp | 49 EXPECT_EQ(0, pthread_once(&onceCall, CallThrdSleep)); in HWTEST_F() 50 EXPECT_EQ(0, pthread_once(&onceCall, CallThrdSleep)); in HWTEST_F() 52 std::thread([&onceCall] { pthread_once(&onceCall, CallThrdSleep); }).join(); in HWTEST_F()
|
/third_party/selinux/libselinux/src/ |
H A D | selinux_internal.h | 11 /* Make pthread_once optional */ 12 #pragma weak pthread_once macro 21 if (pthread_once != NULL) \ 22 pthread_once (&(ONCE_CONTROL), (INIT_FUNCTION)); \
|
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_once/ |
H A D | 1-1.c | 8 * Test that pthread_once() 10 * Dynamic package installation. Tihe first call to pthread_once() by any 12 * 'init_routine' with no arguments. Subsequent calls of pthread_once() 18 * 1.Initialize a pthread_once object 19 * 2.Call pthread_once passing it this object 20 * 3.Call pthread_once again, this time, it shouldn't execute the function 31 /* The init function that pthread_once calls */ 45 /* Call pthread_once, passing it the once_control */ in main() 46 ret = pthread_once(&once_control, an_init_func); in main() 48 printf("pthread_once faile in main() [all...] |
H A D | 3-1.c | 8 * Test pthread_once() 10 * The pthread_once() function is not a cancelation point. However if 12 * 'once_control' shall be as if pthread_once() was never called. 16 * 2. In the thread routine, call pthread_once using a global pthread_once_t 18 * 3. Cancel the thread during the pthread_once init function 19 * 4. Call pthread_once again with the same pthread once_t object 20 * 5. This should call the pthread_once init function. If not, the test fails. 34 /* The init function that pthread_once calls */ 57 pthread_once(&once_control, (void *)an_init_func); in a_thread_func() 61 /* 2nd init function used by the 2nd call of pthread_once */ [all...] |
H A D | 6-1.c | 22 * -> kill a thread which calls pthread_once 184 ret = pthread_once(&once_ctl, initializer); in test() 187 FAILED("pthread_once returned EINTR"); in test() 191 UNRESOLVED(ret, "pthread_once failed"); in test() 194 ret = pthread_once(&once_ctl, initializer); in test() 197 FAILED("pthread_once returned EINTR"); in test() 201 UNRESOLVED(ret, "pthread_once failed"); in test()
|
H A D | 2-1.c | 19 * pthread_once returns only when init routine has completed. 22 * -> call pthread_once (the init routine lasts for 1 second) 25 * The test fails if the init_routine has not been completed when pthread_once 99 ret = pthread_once(&myctl, my_init); in main() 102 UNRESOLVED(ret, "pthread_once failed"); in main()
|
H A D | 1-2.c | 19 * In a process, the first call to pthread_once with a given once_control 23 * -> call pthread_once 26 * The test fails if the init_routine has not been called after pthread_once 99 ret = pthread_once(&myctl, my_init); in main() 102 UNRESOLVED(ret, "pthread_once failed"); in main()
|
H A D | 1-3.c | 23 * -> each call pthread_once 106 ret = pthread_once(arg, my_init); in threaded() 109 UNRESOLVED(ret, "pthread_once failed"); in threaded()
|
/third_party/musl/libc-test/src/functionalext/supplement/thread/ |
H A D | pthread_once.c | 31 int32_t ret = pthread_once(&g_once, OnceRun); in threadfuncA() 38 int32_t ret = pthread_once(&g_once, OnceRun); in threadfuncB()
|
/third_party/ffmpeg/libavutil/ |
H A D | thread.h | 130 ASSERT_PTHREAD(pthread_once, once_control, init_routine); in strict_pthread_once() 144 #define pthread_once strict_pthread_once macro 164 #define ff_thread_once(control, routine) pthread_once(control, routine)
|
/third_party/musl/src/thread/ |
H A D | pthread_once.c | 62 weak_alias(__pthread_once, pthread_once);
|
/third_party/musl/porting/linux/user/src/thread/ |
H A D | pthread_once.c | 62 weak_alias(__pthread_once, pthread_once);
|
/third_party/libphonenumber/cpp/src/phonenumbers/base/memory/ |
H A D | singleton_posix.h | 31 const int ret = pthread_once(&once_control_, &Init); in GetInstance()
|
/third_party/libunwind/libunwind/src/x86_64/ |
H A D | Gtrace.c | 31 #pragma weak pthread_once macro 184 if (likely (pthread_once != NULL)) in trace_cache_get() 186 pthread_once(&trace_cache_once, &trace_cache_init_once); in trace_cache_get()
|
/third_party/libunwind/libunwind/src/aarch64/ |
H A D | Gtrace.c | 32 #pragma weak pthread_once macro 185 if (likely (pthread_once != NULL)) in trace_cache_get() 187 pthread_once(&trace_cache_once, &trace_cache_init_once); in trace_cache_get()
|
/third_party/libunwind/libunwind/src/arm/ |
H A D | Gtrace.c | 32 #pragma weak pthread_once macro 186 if (likely (pthread_once != NULL)) in trace_cache_get() 188 pthread_once(&trace_cache_once, &trace_cache_init_once); in trace_cache_get()
|
/third_party/elfutils/libdwfl/ |
H A D | debuginfod-client.c | 58 pthread_once (&init_control, __libdwfl_debuginfod_init); in dwfl_get_debuginfod_client()
|
/third_party/musl/libc-test/src/regression/ |
H A D | pthread_once-deadlock.c | 2 // pthread_once should not deadlock 24 T(pthread_once(a[0], init)); in start() 44 t_error("pthread_once deadlocked\n"); in deadlocked() 69 t_error("pthread_once ran init %d times instead of once\n", count); in main()
|
/third_party/ffmpeg/compat/ |
H A D | w32pthreads.h | 130 static av_unused int pthread_once(pthread_once_t *once_control, void (*init_routine)(void)) in pthread_once() function
|
H A D | os2threads.h | 210 static av_always_inline int pthread_once(pthread_once_t *once_control, in pthread_once() function
|
/third_party/ltp/include/old/ |
H A D | test.h | 96 pthread_once(<p_once, exec_fn); \
|
/third_party/ltp/include/ |
H A D | tst_safe_pthread.h | 19 pthread_once(<p_once, exec_fn); \
|
/third_party/node/deps/v8/third_party/zlib/ |
H A D | cpu_features.c | 70 pthread_once(&cpu_check_inited_once, _cpu_check_features); in cpu_check_features()
|
/third_party/nghttp2/src/ |
H A D | shrpx_log_config.cc | 78 pthread_once(&lckey_once, make_key); in log_config()
|
/third_party/ltp/testcases/open_posix_testsuite/stress/threads/pthread_once/ |
H A D | stress.c | 19 * The init_routine from pthread_once never execute 24 * -> All threads call pthread_once at the same time 127 ret = pthread_once(&once_ctl, init_routine); in threaded() 130 UNRESOLVED(ret, "pthread_once failed"); in threaded() 224 output("pthread_once stress test PASSED -- %llu iterations\n", in main()
|