From f315c95fa1221441106f1e6e4f4a0f7849ccb4b4 Mon Sep 17 00:00:00 2001 From: tron Date: Fri, 5 Aug 2005 09:15:41 +0000 Subject: (svn r2809) Implement more generic threading functions, which allow more than one thread --- win32.c | 19 ------------------- 1 file changed, 19 deletions(-) (limited to 'win32.c') diff --git a/win32.c b/win32.c index f4857a075..0c31e61c6 100644 --- a/win32.c +++ b/win32.c @@ -1193,25 +1193,6 @@ bool InsertTextBufferClipboard(Textbuf *tb) return false; } -static HANDLE hThread; - -bool CreateOTTDThread(void *func, void *param) -{ - DWORD dwThreadId; - hThread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)func, param, 0, &dwThreadId); - SetThreadPriority(hThread, THREAD_PRIORITY_NORMAL); - - return hThread != NULL; -} - -void JoinOTTDThread(void) -{ - if (hThread == NULL) return; - - WaitForSingleObject(hThread, INFINITE); - if (!CloseHandle(hThread)) DEBUG(misc, 0) ("Failed to close thread handle!"); -} - void CSleep(int milliseconds) { -- cgit v1.2.3-54-g00ecf