win32.c
changeset 2283 defd5403139a
parent 2255 fd5d5adee9d9
child 2285 410dedcf46d1
equal deleted inserted replaced
2282:4efa6c94ef64 2283:defd5403139a
  1202 	SetThreadPriority(hThread, THREAD_PRIORITY_NORMAL);
  1202 	SetThreadPriority(hThread, THREAD_PRIORITY_NORMAL);
  1203 
  1203 
  1204 	return hThread != NULL;
  1204 	return hThread != NULL;
  1205 }
  1205 }
  1206 
  1206 
  1207 void CloseOTTDThread(void)
       
  1208 {
       
  1209 	if (!CloseHandle(hThread)) DEBUG(misc, 0) ("Failed to close thread?...");
       
  1210 }
       
  1211 
       
  1212 void JoinOTTDThread(void)
  1207 void JoinOTTDThread(void)
  1213 {
  1208 {
  1214 	if (hThread == NULL) return;
  1209 	if (hThread == NULL) return;
  1215 
  1210 
  1216 	WaitForSingleObject(hThread, INFINITE);
  1211 	WaitForSingleObject(hThread, INFINITE);
       
  1212 	if (!CloseHandle(hThread)) DEBUG(misc, 0) ("Failed to close thread handle!");
  1217 }
  1213 }
  1218 
  1214 
  1219 
  1215 
  1220 void CSleep(int milliseconds)
  1216 void CSleep(int milliseconds)
  1221 {
  1217 {