aboutsummaryrefslogtreecommitdiffstats
path: root/src/thread.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/thread.c')
-rw-r--r--src/thread.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/thread.c b/src/thread.c
index 151bb0ea6be..0be143cfcbb 100644
--- a/src/thread.c
+++ b/src/thread.c
@@ -356,7 +356,7 @@ DEFUN ("make-mutex", Fmake_mutex, Smake_mutex, 0, 1, 0,
356 struct Lisp_Mutex *mutex = allocate_mutex (); 356 struct Lisp_Mutex *mutex = allocate_mutex ();
357 mutex->owner = 0; 357 mutex->owner = 0;
358 mutex->rec_counter = 0; 358 mutex->rec_counter = 0;
359 mutex->recursive = ! NILP (recursive); 359 mutex->recursive = recursive;
360 XSETMUTEX (ret, mutex); 360 XSETMUTEX (ret, mutex);
361 return ret; 361 return ret;
362} 362}
@@ -370,7 +370,7 @@ DEFUN ("mutex-lock", Fmutex_lock, Smutex_lock, 1, 1, 0,
370 while (1) 370 while (1)
371 { 371 {
372 if (mutex->owner == 0 372 if (mutex->owner == 0
373 || (mutex->recursive && mutex->owner == pthread_self ())) 373 || (!NILP (mutex->recursive) && mutex->owner == pthread_self ()))
374 { 374 {
375 mutex->owner = pthread_self (); 375 mutex->owner = pthread_self ();
376 mutex->rec_counter++; 376 mutex->rec_counter++;
@@ -462,7 +462,7 @@ init_threads_once (void)
462 primary_thread.func = Qnil; 462 primary_thread.func = Qnil;
463 primary_thread.initial_specpdl = Qnil; 463 primary_thread.initial_specpdl = Qnil;
464 XSETPVECTYPE (&primary_thread, PVEC_THREAD); 464 XSETPVECTYPE (&primary_thread, PVEC_THREAD);
465 minibuffer_mutex = Fmake_mutex (Qnil); 465 minibuffer_mutex = Fmake_mutex (Qt);
466} 466}
467 467
468void 468void