[PATCH] Fixed race in __pthread_mutex_init

Thomas Pfaff tpfaff@gmx.net
Fri Apr 26 02:08:00 GMT 2002


__pthead_mutex_init had a race condition if the mutex is initialized with
PTHREAD_MUTEX_INITIALIZER (the mutex could be initialized by two threads
simultanously).
The patch wraps a mutex around mutex creation.

This is will be the last patch for a while. The feedback for the previous
ones was a little low, i do not know if no one (except Rob) is interested
in pthreads for cygwin or my patches are not welcome. I will wait for
comments now.

Regards,

Thomas

2002-04-26  Thomas Pfaff  <tpfaff@gmx.net>

	* thread.cc (__pthread_mutex_init): Wrappped a mutex around mutex
	creation to protect against PTHREAD_MUTEX_INITIALIZER race.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: pthread_mutex_init.patch
Type: application/octet-stream
Size: 2575 bytes
Desc: 
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20020426/8fa1da82/attachment.obj>


More information about the Cygwin-patches mailing list