MCPcopy Create free account
hub / github.com/F-Stack/f-stack / ZSTD_pthread_join

Function ZSTD_pthread_join

freebsd/contrib/zstd/lib/common/threading.c:59–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57}
58
59int ZSTD_pthread_join(ZSTD_pthread_t thread, void **value_ptr)
60{
61 DWORD result;
62
63 if (!thread.handle) return 0;
64
65 result = WaitForSingleObject(thread.handle, INFINITE);
66 switch (result) {
67 case WAIT_OBJECT_0:
68 if (value_ptr) *value_ptr = thread.arg;
69 return 0;
70 case WAIT_ABANDONED:
71 return EINVAL;
72 default:
73 return GetLastError();
74 }
75}
76
77#endif /* ZSTD_MULTITHREAD */
78

Callers 2

POOL_joinFunction · 0.85
POOL_joinFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected