diff options
Diffstat (limited to 'pthread/pt-setcanceltype.c')
-rw-r--r-- | pthread/pt-setcanceltype.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/pthread/pt-setcanceltype.c b/pthread/pt-setcanceltype.c index 7226a3a..3cfbe9c 100644 --- a/pthread/pt-setcanceltype.c +++ b/pthread/pt-setcanceltype.c @@ -35,9 +35,11 @@ __pthread_setcanceltype (int type, int *oldtype) break; } + __pthread_mutex_lock (&p->cancel_lock); if (oldtype) *oldtype = p->cancel_type; p->cancel_type = type; + __pthread_mutex_unlock (&p->cancel_lock); return 0; } |