GNUify slightly.

This commit is contained in:
Christopher Faylor 2002-09-29 23:56:57 +00:00
parent eb208df05a
commit 881ffcb478
1 changed files with 9 additions and 10 deletions

View File

@ -2218,13 +2218,12 @@ __pthread_equal (pthread_t *t1, pthread_t *t2)
/*Mutexes */ /*Mutexes */
/* FIXME: there's a potential race with PTHREAD_MUTEX_INITALIZER: /* FIXME: there's a potential race with PTHREAD_MUTEX_INITALIZER:
*the mutex is not actually inited until the first use. the mutex is not actually inited until the first use.
*So two threads trying to lock/trylock may collide. So two threads trying to lock/trylock may collide.
*Solution: we need a global mutex on mutex creation, or possibly simply Solution: we need a global mutex on mutex creation, or possibly simply
*on all constructors that allow INITIALIZER macros. on all constructors that allow INITIALIZER macros.
*the lock should be very small: only around the init routine, not the lock should be very small: only around the init routine, not
*every test, or all mutex access will be synchronised. every test, or all mutex access will be synchronised. */
*/
int int
pthread_mutex::init (pthread_mutex_t *mutex, pthread_mutex::init (pthread_mutex_t *mutex,