]> git.eshelyaron.com Git - emacs.git/commit
Fix a bug in waiting for condition variable
authorEli Zaretskii <eliz@gnu.org>
Fri, 13 Jan 2017 09:48:51 +0000 (11:48 +0200)
committerEli Zaretskii <eliz@gnu.org>
Fri, 13 Jan 2017 09:48:51 +0000 (11:48 +0200)
commit03e4ab0d586069be65e4a17fbf4cd965a9984726
tree729d86e3282165ca0d58bec8bde33661c9b60ed9
parent62e27ebd54336d30a90ae71e5bdcb910e954c061
Fix a bug in waiting for condition variable

* src/thread.c (lisp_mutex_lock, lisp_mutex_unlock)
(lisp_mutex_unlock_for_wait, condition_wait_callback)
(condition_notify_callback): Improve commentary.
(condition_wait_callback): Call post_acquire_global_lock before
attempting to lock the mutex, to make sure the lock's owner is
recorded correctly.

* test/src/thread-tests.el (threads-condvar-wait): New test.
src/thread.c
test/src/thread-tests.el