diff options
Diffstat (limited to 'nptl/pthread_getschedparam.c')
-rw-r--r-- | nptl/pthread_getschedparam.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/nptl/pthread_getschedparam.c b/nptl/pthread_getschedparam.c index 5e8713016e..434d867779 100644 --- a/nptl/pthread_getschedparam.c +++ b/nptl/pthread_getschedparam.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2004, 2007 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. @@ -38,6 +38,10 @@ __pthread_getschedparam (threadid, policy, param) int result = 0; + /* We have to handle cancellation in the following code since we are + locking another threads descriptor. */ + pthread_cleanup_push ((void (*) (void *)) lll_unlock_wake_cb, &pd->lock); + lll_lock (pd->lock); /* The library is responsible for maintaining the values at all @@ -70,6 +74,8 @@ __pthread_getschedparam (threadid, policy, param) lll_unlock (pd->lock); + pthread_cleanup_pop (0); + return result; } strong_alias (__pthread_getschedparam, pthread_getschedparam) |