| 158 | unsigned WINAPI thread::wrapper_function(void * aArg) |
| 159 | #elif defined(_TTHREAD_POSIX_) |
| 160 | void * 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 | |
| 179 | thread::thread(void (*aFunction)(void *), void * aArg) |
| 180 | { |
nothing calls this directly
no outgoing calls
no test coverage detected