aboutsummaryrefslogtreecommitdiffstats
path: root/src/print.c
diff options
context:
space:
mode:
authorTom Tromey2012-08-15 13:11:22 -0600
committerTom Tromey2012-08-15 13:11:22 -0600
commit51100bb8d36f68842ab55fd0501af56dfc58cc51 (patch)
tree6c94b7f893304276b43c57bd12eff92d914a7cd2 /src/print.c
parent1dcacbc64721b1a4de58aa36460b0a39e766be63 (diff)
downloademacs-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/print.c')
-rw-r--r--src/print.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/print.c b/src/print.c
index 4537521b9fa..42e7241ecba 100644
--- a/src/print.c
+++ b/src/print.c
@@ -1955,6 +1955,14 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag
1955 } 1955 }
1956 PRINTCHAR ('>'); 1956 PRINTCHAR ('>');
1957 } 1957 }
1958 else if (MUTEXP (obj))
1959 {
1960 int len;
1961 strout ("#<mutex ", -1, -1, printcharfun);
1962 len = sprintf (buf, "%p", XMUTEX (obj));
1963 strout (buf, len, len, printcharfun);
1964 PRINTCHAR ('>');
1965 }
1958 else 1966 else
1959 { 1967 {
1960 ptrdiff_t size = ASIZE (obj); 1968 ptrdiff_t size = ASIZE (obj);