path: root/src/thread/pthread_setcancelstate.c
diff options
authorRich Felker <>2015-02-21 22:05:15 -0500
committerRich Felker <>2015-02-21 22:05:15 -0500
commit102f6a01e249ce4495f1119ae6d963a2a4a53ce5 (patch)
tree48176fc7da5e0193a47ae32b22e057f8bef43093 /src/thread/pthread_setcancelstate.c
parentf409338a9e808a09001669377c608fd2803d808d (diff)
add new masked cancellation mode
this is a new extension which is presently intended only for experimental and internal libc use. interface and behavior details may change subject to feedback and experience from using it internally. the basic concept for the new PTHREAD_CANCEL_MASKED state is that the first cancellation point to observe the cancellation request fails with an errno value of ECANCELED rather than acting on cancellation, allowing the caller to process the status and choose whether/how to act upon it.
Diffstat (limited to 'src/thread/pthread_setcancelstate.c')
1 files changed, 1 insertions, 1 deletions
diff --git a/src/thread/pthread_setcancelstate.c b/src/thread/pthread_setcancelstate.c
index 2268217d..822a1398 100644
--- a/src/thread/pthread_setcancelstate.c
+++ b/src/thread/pthread_setcancelstate.c
@@ -2,7 +2,7 @@
int __pthread_setcancelstate(int new, int *old)
- if (new > 1U) return EINVAL;
+ if (new > 2U) return EINVAL;
if (!libc.has_thread_pointer) return ENOSYS;
struct pthread *self = __pthread_self();
if (old) *old = self->canceldisable;