mirror of
https://github.com/fluencelabs/musl
synced 2025-06-28 14:11:56 +00:00
initial check-in, version 0.5.0
This commit is contained in:
10
src/thread/pthread_setcancelstate.c
Normal file
10
src/thread/pthread_setcancelstate.c
Normal file
@ -0,0 +1,10 @@
|
||||
#include "pthread_impl.h"
|
||||
|
||||
int pthread_setcancelstate(int new, int *old)
|
||||
{
|
||||
struct pthread *self = pthread_self();
|
||||
if (old) *old = self->canceldisable;
|
||||
if ((unsigned)new > 1) return EINVAL;
|
||||
self->canceldisable = new;
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user