Skip to content
Snippets Groups Projects
Commit 6a64c381 authored by Henrik (Grubba) Grubbström's avatar Henrik (Grubba) Grubbström
Browse files

Added th_join().

FIXME: Need th_join() for NT!

Rev: src/threads.h:1.53
parent e65bda24
No related branches found
No related tags found
No related merge requests found
/* /*
* $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 #ifndef THREADS_H
#define THREADS_H #define THREADS_H
...@@ -84,6 +84,7 @@ extern pthread_attr_t small_pattr; ...@@ -84,6 +84,7 @@ extern pthread_attr_t small_pattr;
#define th_exit(foo) pthread_exit(foo) #define th_exit(foo) pthread_exit(foo)
#define th_self() pthread_self() #define th_self() pthread_self()
#define th_kill(ID,sig) pthread_kill((ID),(sig)) #define th_kill(ID,sig) pthread_kill((ID),(sig))
#define th_join(ID,res) pthread_join((ID),(res))
#ifdef HAVE_PTHREAD_COND_INIT #ifdef HAVE_PTHREAD_COND_INIT
#define COND_T pthread_cond_t #define COND_T pthread_cond_t
...@@ -130,6 +131,7 @@ extern pthread_attr_t small_pattr; ...@@ -130,6 +131,7 @@ extern pthread_attr_t small_pattr;
#define th_self() thr_self() #define th_self() thr_self()
#define th_kill(ID,sig) thr_kill((ID),(sig)) #define th_kill(ID,sig) thr_kill((ID),(sig))
#define th_yield() thr_yield() #define th_yield() thr_yield()
#define th_join(ID,res) thr_join((ID), NULL, (res))
#define COND_T cond_t #define COND_T cond_t
#define co_init(X) cond_init((X),USYNC_THREAD,0) #define co_init(X) cond_init((X),USYNC_THREAD,0)
...@@ -162,6 +164,7 @@ extern pthread_attr_t small_pattr; ...@@ -162,6 +164,7 @@ extern pthread_attr_t small_pattr;
#define th_exit(X) exit(X) #define th_exit(X) exit(X)
#define th_self() getpid() #define th_self() getpid()
#define th_yield() sginap(0) #define th_yield() sginap(0)
#define th_join(ID,res) /*********/
#define th_equal(X,Y) ((X)==(Y)) #define th_equal(X,Y) ((X)==(Y))
#define th_hash(X) ((unsigned INT32)(X)) #define th_hash(X) ((unsigned INT32)(X))
...@@ -181,6 +184,7 @@ extern pthread_attr_t small_pattr; ...@@ -181,6 +184,7 @@ extern pthread_attr_t small_pattr;
#define th_create(ID,fun,arg) (!(*(ID)=_beginthread(fun, 2*1024*1024, arg))) #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_create_small(ID,fun,arg) (!(*(ID)=_beginthread(fun, 32768, arg)))
#define th_exit(foo) _endthread(foo) #define th_exit(foo) _endthread(foo)
#define th_join(ID,res) /******************* FIXME! ****************/
#define th_self() GetCurrentThread() #define th_self() GetCurrentThread()
#define th_destroy(X) #define th_destroy(X)
#define th_yield() Sleep(0) #define th_yield() Sleep(0)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment