pike.git/
src/
threads.h
Branch:
Tag:
Non-build tags
All tags
No tags
1998-03-01
1998-03-01 03:33:50 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>
d213275f9a14e5f311453980d9215a548402e419 (
13
lines) (+
13
/-
0
)
[
Show
|
Annotate
]
Branch:
7.9
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 */