From: Giuseppe Scrivano Date: Wed, 16 Sep 2009 11:23:35 +0000 (+0200) Subject: Check for `other_threads_p ()' in the inner loop too because this condition can chang... X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=34baca5f333f79433ba8be3ac93c47daed4497a5;p=emacs.git Check for `other_threads_p ()' in the inner loop too because this condition can change since the initial check. --- diff --git a/src/buffer.c b/src/buffer.c index b20d0c42b6a..feacbfcc38a 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -1876,7 +1876,8 @@ acquire_buffer (char *end, void *nb) pthread_cond_broadcast (&buffer_cond); /* If our desired buffer is locked, wait for it. */ - while (!EQ (new_buffer->owner, Qnil) + while (other_threads_p () + && !EQ (new_buffer->owner, Qnil) /* We set the owner to Qt to mean it is being killed. */ && !EQ (new_buffer->owner, Qt)) pthread_cond_wait (&buffer_cond, &global_lock);