aboutsummaryrefslogtreecommitdiffstats
path: root/gc/include/private/solaris_threads.h
diff options
context:
space:
mode:
authorAkinori Ito <aito@eie.yz.yamagata-u.ac.jp>2001-11-09 04:59:17 +0000
committerAkinori Ito <aito@eie.yz.yamagata-u.ac.jp>2001-11-09 04:59:17 +0000
commit6c63633545c254dc085402e0f927a6826d1dd229 (patch)
tree0126fb5598304c713ea1276e294da9098b5df3b4 /gc/include/private/solaris_threads.h
parentInitial revision (diff)
downloadw3m-6c63633545c254dc085402e0f927a6826d1dd229.tar.gz
w3m-6c63633545c254dc085402e0f927a6826d1dd229.zip
Updates from 0.2.1 into 0.2.1-inu-1.5release-0-2-1-inu-1-5
Diffstat (limited to 'gc/include/private/solaris_threads.h')
-rw-r--r--gc/include/private/solaris_threads.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/gc/include/private/solaris_threads.h b/gc/include/private/solaris_threads.h
new file mode 100644
index 0000000..b2cdb36
--- /dev/null
+++ b/gc/include/private/solaris_threads.h
@@ -0,0 +1,34 @@
+#ifdef SOLARIS_THREADS
+
+/* The set of all known threads. We intercept thread creation and */
+/* joins. We never actually create detached threads. We allocate all */
+/* new thread stacks ourselves. These allow us to maintain this */
+/* data structure. */
+/* Protected by GC_thr_lock. */
+/* Some of this should be declared volatile, but that's incosnsistent */
+/* with some library routine declarations. In particular, the */
+/* definition of cond_t doesn't mention volatile! */
+ typedef struct GC_Thread_Rep {
+ struct GC_Thread_Rep * next;
+ thread_t id;
+ word flags;
+# define FINISHED 1 /* Thread has exited. */
+# define DETACHED 2 /* Thread is intended to be detached. */
+# define CLIENT_OWNS_STACK 4
+ /* Stack was supplied by client. */
+# define SUSPENDED 8 /* Currently suspended. */
+ ptr_t stack;
+ size_t stack_size;
+ cond_t join_cv;
+ void * status;
+ } * GC_thread;
+ extern GC_thread GC_new_thread(thread_t id);
+
+ extern GC_bool GC_thr_initialized;
+ extern volatile GC_thread GC_threads[];
+ extern size_t GC_min_stack_sz;
+ extern size_t GC_page_sz;
+ extern void GC_thr_init(void);
+
+# endif /* SOLARIS_THREADS */
+