summaryrefslogtreecommitdiff
path: root/libguile/coop-defs.h
diff options
context:
space:
mode:
authorMarius Vollmer <mvo@zagadka.de>2002-10-03 22:53:17 +0000
committerMarius Vollmer <mvo@zagadka.de>2002-10-03 22:53:17 +0000
commit9997213b7d2385970ba90ad69df63460f1d6b962 (patch)
tree66e2b3cb1e3434e83719ed57f919aa6e2567be5d /libguile/coop-defs.h
parentf7eca35dfe7461fe2a8eb9c6da18a0e921366db5 (diff)
downloadguile-9997213b7d2385970ba90ad69df63460f1d6b962.tar.gz
* coop-defs.h (coop_t): Added new "handle" slot.
* coop-threads.c (all_threads, scm_current_thread, scm_all_threads, scm_i_thread_root): New. (scm_threads_init): Add main thread to all_threads. (scheme_launch_thread): Remove thread from all_threads when it terminates. (scm_call_with_new_thread): Initialize handle slot of coop_t structure and add new thread to all_threads. (scm_spawn_thread): Likewise.
Diffstat (limited to 'libguile/coop-defs.h')
-rw-r--r--libguile/coop-defs.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/libguile/coop-defs.h b/libguile/coop-defs.h
index 3863b1690..e84a352d3 100644
--- a/libguile/coop-defs.h
+++ b/libguile/coop-defs.h
@@ -104,6 +104,8 @@ typedef struct coop_t {
void *joining; /* A queue of threads waiting to join this
thread */
+ SCM handle; /* SCM handle, protected via scm_all_threads. */
+
#ifdef GUILE_ISELECT
int nfds;
SELECT_TYPE *readfds;