aboutsummaryrefslogtreecommitdiffstats
path: root/src/ChangeLog
diff options
context:
space:
mode:
authorEli Zaretskii2013-08-31 14:29:05 +0300
committerEli Zaretskii2013-08-31 14:29:05 +0300
commite57df8f77901a3964d21c3d57fb6769cf4511dc2 (patch)
tree1a748293f62f70a786b9f6c51662e1c132650528 /src/ChangeLog
parentdbe17fefccbff010bbbf6c4d0dccc7b2f3a5e201 (diff)
downloademacs-e57df8f77901a3964d21c3d57fb6769cf4511dc2.tar.gz
emacs-e57df8f77901a3964d21c3d57fb6769cf4511dc2.zip
Improve MS-Windows implementation of threads.
src/systhread.c (sys_cond_init): Set the 'initialized' member to true only if initialization is successful. Initialize wait_count and wait_count_lock. (sys_cond_wait, sys_cond_signal, sys_cond_broadcast): If 'initialized' is false, do nothing. (sys_cond_wait): Fix the implementation to avoid the "missed wakeup" bug: count the waiting threads, and reset the broadcast event once the last thread was released. (sys_cond_signal, sys_cond_broadcast): Use SetEvent instead of PulseEvent. Don't signal the event if no threads are waiting. (sys_cond_destroy): Only close non-NULL handles. (sys_thread_create): Return zero if unsuccessful, 1 if successful. src/systhread.h (w32thread_cond_t): New member 'initialized'. Rename waiters_count and waiters_count_lock to wait_count and wait_count_lock, respectively.
Diffstat (limited to 'src/ChangeLog')
-rw-r--r--src/ChangeLog19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 0aef16d34e3..3e901d84db9 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,22 @@
12013-08-31 Eli Zaretskii <eliz@gnu.org>
2
3 * systhread.c (sys_cond_init): Set the 'initialized' member to
4 true only if initialization is successful. Initialize wait_count
5 and wait_count_lock.
6 (sys_cond_wait, sys_cond_signal, sys_cond_broadcast): If
7 'initialized' is false, do nothing.
8 (sys_cond_wait): Fix the implementation to avoid the "missed
9 wakeup" bug: count the waiting threads, and reset the broadcast
10 event once the last thread was released.
11 (sys_cond_signal, sys_cond_broadcast): Use SetEvent instead of
12 PulseEvent. Don't signal the event if no threads are waiting.
13 (sys_cond_destroy): Only close non-NULL handles.
14 (sys_thread_create): Return zero if unsuccessful, 1 if successful.
15
16 * systhread.h (w32thread_cond_t): New member 'initialized'.
17 Rename waiters_count and waiters_count_lock to wait_count and
18 wait_count_lock, respectively.
19
12013-08-30 Eli Zaretskii <eliz@gnu.org> 202013-08-30 Eli Zaretskii <eliz@gnu.org>
2 21
3 * systhread.h (w32thread_critsect, w32thread_cond_t, sys_mutex_t) 22 * systhread.h (w32thread_critsect, w32thread_cond_t, sys_mutex_t)