X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fthread%2Fpthread_setcancelstate.c;h=5ab8c338f7969c8d79d24fe1a9c18a7481e62555;hb=2488d31f5a946e63e40058baf29fd2991343ea6f;hp=aa0ddcdd316341ec0ab7a685e2e84a5a8a2b149b;hpb=9beb6330c08839e8bb2ebcd129c97c395d9d327e;p=musl diff --git a/src/thread/pthread_setcancelstate.c b/src/thread/pthread_setcancelstate.c index aa0ddcdd..5ab8c338 100644 --- a/src/thread/pthread_setcancelstate.c +++ b/src/thread/pthread_setcancelstate.c @@ -1,10 +1,12 @@ #include "pthread_impl.h" -int pthread_setcancelstate(int new, int *old) +int __pthread_setcancelstate(int new, int *old) { - struct pthread *self = pthread_self(); + if (new > 2U) return EINVAL; + struct pthread *self = __pthread_self(); if (old) *old = self->canceldisable; - if (new > 1U) return EINVAL; self->canceldisable = new; return 0; } + +weak_alias(__pthread_setcancelstate, pthread_setcancelstate);