diff options
author | George Hazan <george.hazan@gmail.com> | 2012-05-17 16:18:42 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-05-17 16:18:42 +0000 |
commit | 2e65438b712e9e6ed81c75765cd0c4aae2ea7e5a (patch) | |
tree | eea037a3f18cf3ccf3661bfdf9f03726fe6f0e72 /plugins/dbeditorpp/threads.cpp | |
parent | cc10c491801228f829acd370f2b12c1aeeddf2c1 (diff) |
oops
git-svn-id: http://svn.miranda-ng.org/main/trunk@15 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/dbeditorpp/threads.cpp')
-rw-r--r-- | plugins/dbeditorpp/threads.cpp | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/plugins/dbeditorpp/threads.cpp b/plugins/dbeditorpp/threads.cpp deleted file mode 100644 index 7ac144adc4..0000000000 --- a/plugins/dbeditorpp/threads.cpp +++ /dev/null @@ -1,48 +0,0 @@ -#include "headers.h" - -// thread stuff - -struct FORK_ARG { - HANDLE hEvent; - void (__cdecl *threadcode)(void*); - unsigned (__stdcall *threadcodeex)(void*); - void *arg; -}; - -void __cdecl forkthread_r(void *param) -{ - struct FORK_ARG *fa=(struct FORK_ARG*)param; - void (*callercode)(void*)=fa->threadcode; - void *arg=fa->arg; - - CallService(MS_SYSTEM_THREAD_PUSH,0,0); - - SetEvent(fa->hEvent); - - __try { - callercode(arg); - } __finally { - CallService(MS_SYSTEM_THREAD_POP,0,0); - } - - return; -} - -unsigned long forkthread ( void (__cdecl *threadcode)(void*),unsigned long stacksize,void *arg) -{ - unsigned long rc; - struct FORK_ARG fa; - - fa.hEvent=CreateEvent(NULL,FALSE,FALSE,NULL); - fa.threadcode=threadcode; - fa.arg=arg; - - rc=_beginthread(forkthread_r,stacksize,&fa); - - if ((unsigned long)-1L != rc) { - WaitForSingleObject(fa.hEvent,INFINITE); - } - CloseHandle(fa.hEvent); - - return rc; -} |