aboutsummaryrefslogtreecommitdiffstats
path: root/src/thread.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/thread.h')
-rw-r--r--src/thread.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/thread.h b/src/thread.h
index 9db3c795653..32ef48f63ff 100644
--- a/src/thread.h
+++ b/src/thread.h
@@ -187,6 +187,19 @@ struct thread_state
187 struct thread_state *next_thread; 187 struct thread_state *next_thread;
188}; 188};
189 189
190/* A mutex in lisp is represented by a pthread condition variable.
191 The system mutex associated with this condition variable is the
192 global lock.
193
194 Using a condition variable lets us implement interruptibility for
195 lisp mutexes. */
196typedef struct
197{
198 struct thread_state *owner;
199 unsigned int count;
200 sys_cond_t condition;
201} lisp_mutex_t;
202
190struct Lisp_Mutex 203struct Lisp_Mutex
191{ 204{
192 struct vectorlike_header header; 205 struct vectorlike_header header;
@@ -198,9 +211,6 @@ struct Lisp_Mutex
198 211
199extern struct thread_state *current_thread; 212extern struct thread_state *current_thread;
200 213
201extern sys_mutex_t global_lock;
202extern void post_acquire_global_lock (struct thread_state *);
203
204extern void unmark_threads (void); 214extern void unmark_threads (void);
205extern void finalize_one_thread (struct thread_state *state); 215extern void finalize_one_thread (struct thread_state *state);
206extern void finalize_one_mutex (struct Lisp_Mutex *); 216extern void finalize_one_mutex (struct Lisp_Mutex *);