* builtins.def (BUILT_IN_LABS, BUILT_IN_LLABS, BUILT_IN_IMAXABS):
[official-gcc.git] / boehm-gc / solaris_threads.h
blobb2cdb36e98d9734447c77b3c41c5f4352362552a
1 #ifdef SOLARIS_THREADS
3 /* The set of all known threads. We intercept thread creation and */
4 /* joins. We never actually create detached threads. We allocate all */
5 /* new thread stacks ourselves. These allow us to maintain this */
6 /* data structure. */
7 /* Protected by GC_thr_lock. */
8 /* Some of this should be declared volatile, but that's incosnsistent */
9 /* with some library routine declarations. In particular, the */
10 /* definition of cond_t doesn't mention volatile! */
11 typedef struct GC_Thread_Rep {
12 struct GC_Thread_Rep * next;
13 thread_t id;
14 word flags;
15 # define FINISHED 1 /* Thread has exited. */
16 # define DETACHED 2 /* Thread is intended to be detached. */
17 # define CLIENT_OWNS_STACK 4
18 /* Stack was supplied by client. */
19 # define SUSPENDED 8 /* Currently suspended. */
20 ptr_t stack;
21 size_t stack_size;
22 cond_t join_cv;
23 void * status;
24 } * GC_thread;
25 extern GC_thread GC_new_thread(thread_t id);
27 extern GC_bool GC_thr_initialized;
28 extern volatile GC_thread GC_threads[];
29 extern size_t GC_min_stack_sz;
30 extern size_t GC_page_sz;
31 extern void GC_thr_init(void);
33 # endif /* SOLARIS_THREADS */