diff options
author | watcherhd <watcherhd@e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb> | 2011-11-26 14:19:43 +0000 |
---|---|---|
committer | watcherhd <watcherhd@e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb> | 2011-11-26 14:19:43 +0000 |
commit | 7aff1e4cb053394db57c2814d5fe1e6493e0cc75 (patch) | |
tree | c8585e44049b37e4da152495c954242204c2c38d /dbeditorpp/threads.cpp | |
parent | 6f3d69266933ef120d229e0daf2da164b77214d0 (diff) |
Project folders rename part 2
git-svn-id: http://miranda-plugins.googlecode.com/svn/trunk@214 e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb
Diffstat (limited to 'dbeditorpp/threads.cpp')
-rw-r--r-- | dbeditorpp/threads.cpp | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/dbeditorpp/threads.cpp b/dbeditorpp/threads.cpp deleted file mode 100644 index 7ac144a..0000000 --- a/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; -} |