make socketcall types common as they are same for all architectures
[oweals/musl.git] / src / thread / pthread_setcancelstate.c
1 #include "pthread_impl.h"
2
3 int pthread_setcancelstate(int new, int *old)
4 {
5         if (new > 1U) return EINVAL;
6         if (!libc.has_thread_pointer) return ENOSYS;
7         struct pthread *self = __pthread_self();
8         if (old) *old = self->canceldisable;
9         self->canceldisable = new;
10         return 0;
11 }