summaryrefslogtreecommitdiff
path: root/libguile/threads.h
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2008-09-18 22:55:16 +0200
committerLudovic Courtès <ludo@gnu.org>2008-09-18 22:55:16 +0200
commit72e6b60838ee9cfb80b6a5c24531c8b924d703db (patch)
tree87e2df17c1b850ce12377d627d898d16aa6df168 /libguile/threads.h
parent108e4c5b6449e89223afe696935c23deb4fc11f1 (diff)
downloadguile-72e6b60838ee9cfb80b6a5c24531c8b924d703db.tar.gz
Implement `scm_without_guile ()' in terms of `GC_do_blocking ()'.
* libguile/threads.c (guilify_self_1): Initialize `t->guile_mode'. (guilify_self_2): Likewise. (struct without_guile_arg): New type. (without_guile_trampoline): New function. (scm_without_guile): Implement in terms of `GC_do_blocking ()'. * libguile/threads.h (scm_i_thread)[guile_mode]: New field.
Diffstat (limited to 'libguile/threads.h')
-rw-r--r--libguile/threads.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/libguile/threads.h b/libguile/threads.h
index 7eee8710e..89e3b0238 100644
--- a/libguile/threads.h
+++ b/libguile/threads.h
@@ -61,6 +61,9 @@ typedef struct scm_i_thread {
int canceled;
int exited;
+ /* Boolean indicating whether the thread is in guile mode. */
+ int guile_mode;
+
SCM sleep_object;
scm_i_pthread_mutex_t *sleep_mutex;
scm_i_pthread_cond_t sleep_cond;