Code

Implement pthread_cond_broadcast on Windows
authorJohannes Sixt <j6t@kdbg.org>
Fri, 29 Jan 2010 23:54:05 +0000 (00:54 +0100)
committerJunio C Hamano <gitster@pobox.com>
Sat, 30 Jan 2010 03:42:40 +0000 (19:42 -0800)
commit947c3464e49522c55296a8191aed7946bd0f4308
tree2a8aa77ee10f163641c2c67776f81ce7e4547d9d
parenta004fb923d74c1d5500d493506b1462eb04cf017
Implement pthread_cond_broadcast on Windows

See http://www.cse.wustl.edu/~schmidt/win32-cv-1.html, section "The
SignalObjectAndWait solution". But note that this implementation does not
use SignalObjectAndWait (which is needed to achieve fairness, but we do
not need fairness).

Note that our implementations of pthread_cond_broadcast and
pthread_cond_signal require that they are invoked with the mutex held that
is used in the pthread_cond_wait calls.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
compat/win32/pthread.c
compat/win32/pthread.h