diff options
author | Tom Tromey <tromey@redhat.com> | 2012-08-19 03:23:03 -0600 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2012-08-19 03:23:03 -0600 |
commit | 5651640d578fa2efa40be4789d9fa61813ccb1fa (patch) | |
tree | a59e33464016e88cb3f0501d6c47baf8aa5e07aa /src/thread.h | |
parent | ee1464eab19311ab7708b135bdb6eb989909e4cc (diff) | |
download | emacs-5651640d578fa2efa40be4789d9fa61813ccb1fa.tar.gz emacs-5651640d578fa2efa40be4789d9fa61813ccb1fa.tar.bz2 emacs-5651640d578fa2efa40be4789d9fa61813ccb1fa.zip |
condition variables
This implements condition variables for elisp.
This needs more tests.
Diffstat (limited to 'src/thread.h')
-rw-r--r-- | src/thread.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/thread.h b/src/thread.h index 6b66ea4d1c3..989acec6afb 100644 --- a/src/thread.h +++ b/src/thread.h @@ -215,11 +215,27 @@ struct Lisp_Mutex lisp_mutex_t mutex; }; +/* A condition variable as a lisp object. */ +struct Lisp_CondVar +{ + struct vectorlike_header header; + + /* The associated mutex. */ + Lisp_Object mutex; + + /* The name of the condition variable, or nil. */ + Lisp_Object name; + + /* The lower-level condition variable object. */ + sys_cond_t cond; +}; + extern struct thread_state *current_thread; extern void unmark_threads (void); extern void finalize_one_thread (struct thread_state *state); extern void finalize_one_mutex (struct Lisp_Mutex *); +extern void finalize_one_condvar (struct Lisp_CondVar *); extern void init_threads_once (void); extern void init_threads (void); |