Branch: Tag:

1998-09-05

1998-09-05 20:08:27 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Added th_join().
FIXME: Need th_join() for NT!

Rev: src/threads.h:1.53

1:   /* -  * $Id: threads.h,v 1.52 1998/08/31 12:48:33 grubba Exp $ +  * $Id: threads.h,v 1.53 1998/09/05 20:08:27 grubba Exp $    */   #ifndef THREADS_H   #define THREADS_H
84:   #define th_exit(foo) pthread_exit(foo)   #define th_self() pthread_self()   #define th_kill(ID,sig) pthread_kill((ID),(sig)) + #define th_join(ID,res) pthread_join((ID),(res))   #ifdef HAVE_PTHREAD_COND_INIT   #define COND_T pthread_cond_t   
130:   #define th_self() thr_self()   #define th_kill(ID,sig) thr_kill((ID),(sig))   #define th_yield() thr_yield() + #define th_join(ID,res) thr_join((ID), NULL, (res))      #define COND_T cond_t   #define co_init(X) cond_init((X),USYNC_THREAD,0)
162:   #define th_exit(X) exit(X)   #define th_self() getpid()   #define th_yield() sginap(0) + #define th_join(ID,res) /*********/   #define th_equal(X,Y) ((X)==(Y))   #define th_hash(X) ((unsigned INT32)(X))   
181:   #define th_create(ID,fun,arg) (!(*(ID)=_beginthread(fun, 2*1024*1024, arg)))   #define th_create_small(ID,fun,arg) (!(*(ID)=_beginthread(fun, 32768, arg)))   #define th_exit(foo) _endthread(foo) + #define th_join(ID,res) /******************* FIXME! ****************/   #define th_self() GetCurrentThread()   #define th_destroy(X)   #define th_yield() Sleep(0)