pike.git / src / threads.h

version» Context lines:

pike.git/src/threads.h:1:   /* -  * $Id: threads.h,v 1.61 1999/05/08 04:46:08 hubbe Exp $ +  * $Id: threads.h,v 1.62 1999/05/08 04:47:44 hubbe Exp $    */   #ifndef THREADS_H   #define THREADS_H      #include "machine.h"   #include "interpret.h"   #include "object.h"   #include "error.h"   #ifdef HAVE_SYS_TYPES_H   /* Needed for pthread_t on OSF/1 */
pike.git/src/threads.h:179:   #include <process.h>   #include <windows.h>      #define THREAD_T unsigned   #define th_setconcurrency(X)   #define th_create(ID,fun,arg) (!_beginthreadex(NULL, 2*1024*1024,fun, arg,0,ID))   #define th_create_small(ID,fun,arg) (!_beginthreadex(NULL, 8192*sizeof(char *), fun,arg,0,ID))   #define TH_RETURN_TYPE unsigned __stdcall   #define th_exit(foo) _endthread(foo)   #define th_join(ID,res) /******************* FIXME! ****************/ - #define th_self() GetCurrentThread() + #define th_self() GetCurrentThreadId()   #define th_destroy(X)   #define th_yield() Sleep(0)   #define th_equal(X,Y) ((X)==(Y))   #define th_hash(X) ((unsigned INT32)(X))      #define MUTEX_T HANDLE   #define mt_init(X) CheckValidHandle((*(X)=CreateMutex(NULL, 0, NULL)))   #define mt_lock(X) (CheckValidHandle(*(X)),WaitForSingleObject(*(X), INFINITE))   #define mt_trylock(X) (CheckValidHandle(*(X)),WaitForSingleObject(*(X), 0))   #define mt_unlock(X) (CheckValidHandle(*(X)),ReleaseMutex(*(X)))