mirror of
https://github.com/fluencelabs/musl
synced 2025-06-02 17:41:37 +00:00
minor locking optimizations
This commit is contained in:
parent
0e1762539c
commit
6232b96f51
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
void __lock(volatile int *l)
|
void __lock(volatile int *l)
|
||||||
{
|
{
|
||||||
int spins=100000;
|
int spins=10000;
|
||||||
/* Do not use futexes because we insist that unlocking is a simple
|
/* Do not use futexes because we insist that unlocking is a simple
|
||||||
* assignment to optimize non-pathological code with no contention. */
|
* assignment to optimize non-pathological code with no contention. */
|
||||||
while (a_xchg(l, 1))
|
while (a_xchg(l, 1))
|
||||||
|
@ -22,7 +22,7 @@ void __pthread_unwind_next(struct __ptcb *cb)
|
|||||||
longjmp((void *)cb->__next->__jb, 1);
|
longjmp((void *)cb->__next->__jb, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
LOCK(&self->exitlock);
|
__lock(&self->exitlock);
|
||||||
|
|
||||||
__pthread_tsd_run_dtors();
|
__pthread_tsd_run_dtors();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user