diff options
author | mataes2007 <mataes2007@e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb> | 2011-04-28 12:14:32 +0000 |
---|---|---|
committer | mataes2007 <mataes2007@e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb> | 2011-04-28 12:14:32 +0000 |
commit | bed6bee936ff79d32c08245f0fedaee9d839f76f (patch) | |
tree | fd32ed9cb9241b2c6387b87eb0412e5e5d2ff7c5 /dbeditorpp/threads.c | |
parent | 0a1ada17c01b0c517995b095eb43bb23c5b3c6f1 (diff) |
test rename
git-svn-id: http://miranda-plugins.googlecode.com/svn/trunk@64 e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb
Diffstat (limited to 'dbeditorpp/threads.c')
-rw-r--r-- | dbeditorpp/threads.c | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/dbeditorpp/threads.c b/dbeditorpp/threads.c deleted file mode 100644 index 7ac144a..0000000 --- a/dbeditorpp/threads.c +++ /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; -} |