[PATCH] add support for PTHREAD_MUTEX_NORMAL

Cygwin (Robert Collins) rbcollins@cygwin.com
Thu Mar 13 05:54:00 GMT 2003


This:

   if (1 == InterlockedIncrement ((long *)&lock_counter))

is not safe. You can only check for equal to 0, less than 0, and greater
than 0 with InterlockedIncrement | Decrement.

Secondly, IIRC lock_counter should be long, so the (long *) typecasting
isn't needed.

Rob




More information about the Cygwin-patches mailing list