X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fthread%2Fpthread_setcanceltype.c;h=bf0a3f383dd34943c6eb502f50043b4dddcff537;hb=eb4bd8d8bb5c9f535ee8250edd4efbd3d4f84c5a;hp=7eb543a8961e63a0eddff2b128d0229b179d3dfa;hpb=ebf82447be4b30bedc19ad868c3a0662b1ba596d;p=musl diff --git a/src/thread/pthread_setcanceltype.c b/src/thread/pthread_setcanceltype.c index 7eb543a8..bf0a3f38 100644 --- a/src/thread/pthread_setcanceltype.c +++ b/src/thread/pthread_setcanceltype.c @@ -2,9 +2,10 @@ int pthread_setcanceltype(int new, int *old) { - struct pthread *self = pthread_self(); + struct pthread *self = __pthread_self(); if (new > 1U) return EINVAL; if (old) *old = self->cancelasync; self->cancelasync = new; + if (new) pthread_testcancel(); return 0; }