Skip to content

Commit 492a79c

Browse files
committed
Robust mutexes are unsupported
Reverts musl commit 5994de4e02a05c19a6bddadcfb687ab2e7511bd6.
1 parent 2c79984 commit 492a79c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
#include "pthread_impl.h"
2+
#ifndef __EMSCRIPTEN__ // XXX Emscripten revert musl commit 5994de4e02a05c19a6bddadcfb687ab2e7511bd6
23
#include "syscall.h"
34

45
static volatile int check_robust_result = -1;
6+
#endif
57

68
int pthread_mutexattr_setrobust(pthread_mutexattr_t *a, int robust)
79
{
810
if (robust > 1U) return EINVAL;
11+
#ifndef __EMSCRIPTEN__ // XXX Emscripten revert musl commit 5994de4e02a05c19a6bddadcfb687ab2e7511bd6
912
if (robust) {
10-
#ifndef __EMSCRIPTEN__
1113
int r = check_robust_result;
1214
if (r < 0) {
1315
void *p;
@@ -16,10 +18,10 @@ int pthread_mutexattr_setrobust(pthread_mutexattr_t *a, int robust)
1618
a_store(&check_robust_result, r);
1719
}
1820
if (r) return r;
19-
#endif
2021
a->__attr |= 4;
2122
return 0;
2223
}
24+
#endif
2325
a->__attr &= ~4;
2426
return 0;
2527
}

0 commit comments

Comments
 (0)