MCPcopy Create free account
hub / github.com/VirtualGL/virtualgl / start

Method start

util/Thread.cpp:20–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18
19
20void Thread::start(void)
21{
22 if(!obj) throw(Error("Thread::start()", "Unexpected NULL pointer"));
23
24 #ifdef _WIN32
25
26 DWORD tid;
27 if((handle = CreateThread(NULL, 0, threadFunc, obj, 0, &tid)) == NULL)
28 throw(W32Error("Thread::start()"));
29
30 #else
31
32 int err = 0;
33 if((err = pthread_create(&handle, NULL, threadFunc, obj)) != 0)
34 throw(Error("Thread::start()", strerror(err == -1 ? errno : err)));
35
36 #endif
37}
38
39
40void Thread::stop(void)

Callers 15

listenMethod · 0.45
ListenerMethod · 0.45
ClientWinMethod · 0.45
runMethod · 0.45
connectMethod · 0.45
multiThreadTestFunction · 0.45
mainFunction · 0.45
XVTransMethod · 0.45
runMethod · 0.45
mainFunction · 0.45
X11TransMethod · 0.45
runMethod · 0.45

Calls 2

W32ErrorClass · 0.85
ErrorClass · 0.50

Tested by 8

writeTestFunction · 0.36
readTestFunction · 0.36
nativeWriteFunction · 0.36
nativeReadFunction · 0.36
nativeStressFunction · 0.36
event_loopFunction · 0.36
mainFunction · 0.36
mainFunction · 0.36