mirror of
https://github.com/fluencelabs/musl
synced 2025-06-30 07:02:41 +00:00
fix pthread_join wait call: thread termination tid futex is not private
this seeme to be the bug that prevented enabling of private futex support. i'm going to hold off on switching to private futexes until after the next release, and until i get a chance to audit all wait/wake calls to make sure they're using the correct private argument, but with this change it should be safe to enable private futex support.
This commit is contained in:
@ -7,7 +7,7 @@ static void dummy(void *p)
|
|||||||
int pthread_join(pthread_t t, void **res)
|
int pthread_join(pthread_t t, void **res)
|
||||||
{
|
{
|
||||||
int tmp = t->tid;
|
int tmp = t->tid;
|
||||||
if (tmp) __timedwait(&t->tid, tmp, 0, 0, dummy, 0, 1);
|
if (tmp) __timedwait(&t->tid, tmp, 0, 0, dummy, 0, 0);
|
||||||
if (res) *res = t->result;
|
if (res) *res = t->result;
|
||||||
if (t->map_base) munmap(t->map_base, t->map_size);
|
if (t->map_base) munmap(t->map_base, t->map_size);
|
||||||
return 0;
|
return 0;
|
||||||
|
Reference in New Issue
Block a user