MCPcopy Create free account
hub / github.com/OpenKinect/libfreenect2 / wrapper_function

Method wrapper_function

src/tinythread/tinythread.cpp:160–177  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

158unsigned WINAPI thread::wrapper_function(void * aArg)
159#elif defined(_TTHREAD_POSIX_)
160void * thread::wrapper_function(void * aArg)
161#endif
162{
163 // Get thread startup information
164 _thread_start_info * ti = (_thread_start_info *) aArg;
165
166 // Call the actual client thread function
167 ti->mFunction(ti->mArg);
168
169 // The thread is no longer executing
170 lock_guard<mutex> guard(ti->mThread->mDataMutex);
171 ti->mThread->mNotAThread = true;
172
173 // The thread is responsible for freeing the startup information
174 delete ti;
175
176 return 0;
177}
178
179thread::thread(void (*aFunction)(void *), void * aArg)
180{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected