summaryrefslogtreecommitdiff
path: root/src/thread.h
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2012-08-15 13:11:22 -0600
committerTom Tromey <tromey@redhat.com>2012-08-15 13:11:22 -0600
commit51100bb8d36f68842ab55fd0501af56dfc58cc51 (patch)
tree6c94b7f893304276b43c57bd12eff92d914a7cd2 /src/thread.h
parent1dcacbc64721b1a4de58aa36460b0a39e766be63 (diff)
downloademacs-51100bb8d36f68842ab55fd0501af56dfc58cc51.tar.gz
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.h3
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
struct thread_state *next_thread;
};
+struct Lisp_Mutex;
+
extern struct thread_state *current_thread;
extern sys_mutex_t global_lock;
@@ -175,6 +177,7 @@ extern void post_acquire_global_lock (struct thread_state *);
extern void unmark_threads (void);
extern void finalize_one_thread (struct thread_state *state);
+extern void finalize_one_mutex (struct Lisp_Mutex *);
extern void init_threads_once (void);
extern void init_threads (void);