struct Lisp_Mutex *mutex = allocate_mutex ();
mutex->owner = 0;
mutex->rec_counter = 0;
- mutex->recursive = ! NILP (recursive);
+ mutex->recursive = recursive;
XSETMUTEX (ret, mutex);
return ret;
}
while (1)
{
if (mutex->owner == 0
- || (mutex->recursive && mutex->owner == pthread_self ()))
+ || (!NILP (mutex->recursive) && mutex->owner == pthread_self ()))
{
mutex->owner = pthread_self ();
mutex->rec_counter++;
primary_thread.func = Qnil;
primary_thread.initial_specpdl = Qnil;
XSETPVECTYPE (&primary_thread, PVEC_THREAD);
- minibuffer_mutex = Fmake_mutex (Qnil);
+ minibuffer_mutex = Fmake_mutex (Qt);
}
void
struct Lisp_Vector *v_next;
/* Is the mutex recursive? */
- int recursive;
+ Lisp_Object recursive;
/* Thread that owns the mutex. */
pthread_t owner;