Lines Matching refs:thread
38 ZSTD_pthread_t* const thread = (ZSTD_pthread_t*) arg; in worker() local
39 thread->arg = thread->start_routine(thread->arg); in worker()
43 int ZSTD_pthread_create(ZSTD_pthread_t* thread, const void* unused, in ZSTD_pthread_create() argument
47 thread->arg = arg; in ZSTD_pthread_create()
48 thread->start_routine = start_routine; in ZSTD_pthread_create()
49 thread->handle = (HANDLE) _beginthreadex(NULL, 0, worker, thread, 0, NULL); in ZSTD_pthread_create()
51 if (!thread->handle) in ZSTD_pthread_create()
57 int ZSTD_pthread_join(ZSTD_pthread_t thread, void **value_ptr) in ZSTD_pthread_join() argument
61 if (!thread.handle) return 0; in ZSTD_pthread_join()
63 result = WaitForSingleObject(thread.handle, INFINITE); in ZSTD_pthread_join()
66 if (value_ptr) *value_ptr = thread.arg; in ZSTD_pthread_join()