1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-30 22:43:12 +03:00

NPTL: Conditionalize asynchronous cancellation support on [SIGCANCEL].

This commit is contained in:
Roland McGrath
2014-11-20 13:43:35 -08:00
parent f214ff74f4
commit 2f531bbb7b
3 changed files with 24 additions and 7 deletions

View File

@ -26,12 +26,15 @@ __pthread_setcanceltype (type, oldtype)
int type;
int *oldtype;
{
volatile struct pthread *self;
if (type < PTHREAD_CANCEL_DEFERRED || type > PTHREAD_CANCEL_ASYNCHRONOUS)
return EINVAL;
self = THREAD_SELF;
#ifndef SIGCANCEL
if (type == PTHREAD_CANCEL_ASYNCHRONOUS)
return ENOTSUP;
#endif
volatile struct pthread *self = THREAD_SELF;
int oldval = THREAD_GETMEM (self, cancelhandling);
while (1)