MCPcopy Create free account
hub / github.com/Meituan-Dianping/SQLAdvisor / pthread_join

Function pthread_join

mysys/my_winthread.c:105–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

103}
104
105int pthread_join(pthread_t thread, void **value_ptr)
106{
107 DWORD ret;
108 HANDLE handle;
109
110 handle= OpenThread(SYNCHRONIZE, FALSE, thread);
111 if (!handle)
112 {
113 errno= EINVAL;
114 goto error_return;
115 }
116
117 ret= WaitForSingleObject(handle, INFINITE);
118
119 if(ret != WAIT_OBJECT_0)
120 {
121 errno= EINVAL;
122 goto error_return;
123 }
124
125 CloseHandle(handle);
126 return 0;
127
128error_return:
129 if(handle)
130 CloseHandle(handle);
131 return -1;
132}
133
134int pthread_cancel(pthread_t thread)
135{

Callers 3

my_os_timer_deinitFunction · 0.85
my_os_timer_deinitFunction · 0.85
join_threadFunction · 0.85

Calls

no outgoing calls

Tested by 1

join_threadFunction · 0.68