clean up handling of thread/nothread mode, locking
[musl] / src / thread / pthread_setcancelstate.c
index 6722541..ebb6eba 100644 (file)
@@ -3,7 +3,7 @@
 int pthread_setcancelstate(int new, int *old)
 {
        if (new > 1U) return EINVAL;
-       if (libc.lock) {
+       if (libc.threaded) {
                struct pthread *self = __pthread_self();
                if (old) *old = self->canceldisable;
                self->canceldisable = new;