diff options
| author | Tom Tromey | 2012-08-15 13:11:22 -0600 |
|---|---|---|
| committer | Tom Tromey | 2012-08-15 13:11:22 -0600 |
| commit | 51100bb8d36f68842ab55fd0501af56dfc58cc51 (patch) | |
| tree | 6c94b7f893304276b43c57bd12eff92d914a7cd2 /src/thread.h | |
| parent | 1dcacbc64721b1a4de58aa36460b0a39e766be63 (diff) | |
| download | emacs-51100bb8d36f68842ab55fd0501af56dfc58cc51.tar.gz emacs-51100bb8d36f68842ab55fd0501af56dfc58cc51.zip | |
This supplies the mutex implementation for Emacs Lisp.
A lisp mutex is implemented using a condition variable, so that we can
interrupt a mutex-lock operation by calling thread-signal on the
blocking thread. I did things this way because pthread_mutex_lock
can't readily be interrupted.
Diffstat (limited to 'src/thread.h')
| -rw-r--r-- | src/thread.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/thread.h b/src/thread.h index 3b533316817..d3ec38a22b9 100644 --- a/src/thread.h +++ b/src/thread.h | |||
| @@ -168,6 +168,8 @@ struct thread_state | |||
| 168 | struct thread_state *next_thread; | 168 | struct thread_state *next_thread; |
| 169 | }; | 169 | }; |
| 170 | 170 | ||
| 171 | struct Lisp_Mutex; | ||
| 172 | |||
| 171 | extern struct thread_state *current_thread; | 173 | extern struct thread_state *current_thread; |
| 172 | 174 | ||
| 173 | extern sys_mutex_t global_lock; | 175 | extern sys_mutex_t global_lock; |
| @@ -175,6 +177,7 @@ extern void post_acquire_global_lock (struct thread_state *); | |||
| 175 | 177 | ||
| 176 | extern void unmark_threads (void); | 178 | extern void unmark_threads (void); |
| 177 | extern void finalize_one_thread (struct thread_state *state); | 179 | extern void finalize_one_thread (struct thread_state *state); |
| 180 | extern void finalize_one_mutex (struct Lisp_Mutex *); | ||
| 178 | 181 | ||
| 179 | extern void init_threads_once (void); | 182 | extern void init_threads_once (void); |
| 180 | extern void init_threads (void); | 183 | extern void init_threads (void); |