Branch: Tag:

1998-03-01

1998-03-01 03:33:50 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

new thread stuff: th_hash & th_equal

Rev: src/threads.c:1.58
Rev: src/threads.h:1.33

150:   #define th_exit(X) exit(X)   #define th_self() getpid()   #define th_yield() sginap(0) + #define th_equal(X,Y) ((X)==(Y)) + #define th_hash(X) ((unsigned INT32)(X))      /*    * No cond_vars yet
170:   #define th_self() GetCurrentThread()   #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)))
250:   #define th_yield()   #endif    + #ifndef th_equal + #define th_equal(X,Y) (!MEMCPY(&(X),&(Y),sizeof(THREAD_T))) + #endif +  + #ifndef th_hash + #define th_hash(X) hashmem(&(X),sizeof(THREAD_T), 16) + #endif +    /* Define to get a debug-trace of some of the threads operations. */   /* #define VERBOSE_THREADS_DEBUG */