| 192 | } |
| 193 | |
| 194 | void nthread_cleanup() |
| 195 | { |
| 196 | nthread_should_run = FALSE; |
| 197 | gdwTurnsInTransit = 0; |
| 198 | gdwNormalMsgSize = 0; |
| 199 | gdwLargestMsgSize = 0; |
| 200 | if (sghThread != NULL && glpNThreadId != SDL_GetThreadID(NULL)) { |
| 201 | if (!sgbThreadIsRunning) |
| 202 | sgMemCrit.Leave(); |
| 203 | SDL_WaitThread(sghThread, NULL); |
| 204 | sghThread = NULL; |
| 205 | } |
| 206 | } |
| 207 | |
| 208 | void nthread_ignore_mutex(BOOL bStart) |
| 209 | { |