diff options
author | George Hazan <george.hazan@gmail.com> | 2013-04-02 15:39:37 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-04-02 15:39:37 +0000 |
commit | bba1ccccb6072b6e12ede32d4e8e6a28ede32c5c (patch) | |
tree | 5e35e904856f67a54762ff16a0e3d0a8f7928d57 /plugins/!NotAdopted/Non-IM Contact/threads.c | |
parent | 6270be1be1979c0ad41ea506200431bcfc79360c (diff) |
first version of Non-IM Contact that could be compiled
git-svn-id: http://svn.miranda-ng.org/main/trunk@4287 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/!NotAdopted/Non-IM Contact/threads.c')
-rw-r--r-- | plugins/!NotAdopted/Non-IM Contact/threads.c | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/plugins/!NotAdopted/Non-IM Contact/threads.c b/plugins/!NotAdopted/Non-IM Contact/threads.c deleted file mode 100644 index c39fae61a7..0000000000 --- a/plugins/!NotAdopted/Non-IM Contact/threads.c +++ /dev/null @@ -1,49 +0,0 @@ -#include "commonheaders.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;
-}
-
|