musl/src/thread/pthread_setcancelstate.c

11 lines
224 B
C
Raw Normal View History

2011-02-12 00:22:29 -05:00
#include "pthread_impl.h"
int pthread_setcancelstate(int new, int *old)
{
struct pthread *self = pthread_self();
if (old) *old = self->canceldisable;
if (new > 1U) return EINVAL;
self->canceldisable = new;
2011-02-12 00:22:29 -05:00
return 0;
}