X-Git-Url: http://nsz.repo.hu/git/?p=musl;a=blobdiff_plain;f=src%2Fthread%2Fpthread_mutexattr_setrobust.c;fp=src%2Fthread%2Fpthread_mutexattr_setrobust.c;h=4a296ba11890d1dae8766697deedfc526dcf3864;hp=0000000000000000000000000000000000000000;hb=047e434ef5fd5437a74f98f63c40a77a683f7f3f;hpb=18c7ea8055cf733f168d2c74d7cc8523a360f5f1 diff --git a/src/thread/pthread_mutexattr_setrobust.c b/src/thread/pthread_mutexattr_setrobust.c new file mode 100644 index 00000000..4a296ba1 --- /dev/null +++ b/src/thread/pthread_mutexattr_setrobust.c @@ -0,0 +1,9 @@ +#include "pthread_impl.h" + +int pthread_mutexattr_setrobust(pthread_mutexattr_t *a, int robust) +{ + if (robust > 1U) return EINVAL; + *a &= ~4; + *a |= robust*4; + return 0; +}