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