X-Git-Url: http://nsz.repo.hu/git/?p=musl;a=blobdiff_plain;f=src%2Fthread%2Fpthread_setcancelstate.c;h=ba2b231190436076b1d200bc76fa6e2c5dec9443;hp=6722541a27e73e190b00973997432c5d4fcc375c;hb=HEAD;hpb=ebf82447be4b30bedc19ad868c3a0662b1ba596d diff --git a/src/thread/pthread_setcancelstate.c b/src/thread/pthread_setcancelstate.c index 6722541a..ba2b2311 100644 --- a/src/thread/pthread_setcancelstate.c +++ b/src/thread/pthread_setcancelstate.c @@ -3,7 +3,7 @@ int pthread_setcancelstate(int new, int *old) { if (new > 1U) return EINVAL; - if (libc.lock) { + if (libc.main_thread) { struct pthread *self = __pthread_self(); if (old) *old = self->canceldisable; self->canceldisable = new;