6044c03a37
is safe to call pthread_mutex_init() on the same shared mutex several times. POSIX claims that the behaviour in this case is undefined. Make this working by only allowing one caller to initialize the mutex. Other callers either see already completed initialization and do nothing, or busy-loop yielding while designated initializer finishes. Also make the API requirements loose by initializing mutexes on other pthread_mutex*() calls if they see uninitialized shared mutex. Only mutexes provide the hack for now, but it could be also implemented for other process shared primitives from libthr. Reported and tested by: "Oleg V. Nauman" <oleg@opentransfer.com> Sponsored by: The FreeBSD Foundation |
||
---|---|---|
.. | ||
arch | ||
support | ||
sys | ||
tests | ||
thread | ||
libthr.3 | ||
Makefile | ||
Makefile.depend | ||
plockstat.d | ||
pthread.map |