[git commit master] remove wait callbacks for non-cancelation funcs

Bernhard Reutner-Fischer rep.dot.nop at gmail.com
Fri Apr 23 14:31:55 UTC 2010


commit: http://git.uclibc.org/uClibc/commit/?id=bb8a3f00cfa3913c7f360f2fc601b9315cb5474a
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/master

No need to install a cancellation handler, these are no cancellation
point.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop at gmail.com>
Signed-off-by: Austin Foxley <austinf at cetoncorp.com>
---
 libpthread/nptl/pthread_getattr_np.c    |    6 ------
 libpthread/nptl/pthread_getschedparam.c |    6 ------
 libpthread/nptl/pthread_setschedparam.c |    6 ------
 libpthread/nptl/pthread_setschedprio.c  |    6 ------
 4 files changed, 0 insertions(+), 24 deletions(-)

diff --git a/libpthread/nptl/pthread_getattr_np.c b/libpthread/nptl/pthread_getattr_np.c
index 969459f..8819731 100644
--- a/libpthread/nptl/pthread_getattr_np.c
+++ b/libpthread/nptl/pthread_getattr_np.c
@@ -39,10 +39,6 @@ pthread_getattr_np (thread_id, attr)
   struct pthread_attr *iattr = (struct pthread_attr *) attr;
   int ret = 0;
 
-  /* We have to handle cancellation in the following code since we are
-     locking another threads desriptor.  */
-  pthread_cleanup_push ((void (*) (void *)) lll_unlock_wake_cb, &thread->lock);
-
   lll_lock (thread->lock);
 
   /* The thread library is responsible for keeping the values in the
@@ -171,7 +167,5 @@ pthread_getattr_np (thread_id, attr)
 
   lll_unlock (thread->lock);
 
-  pthread_cleanup_pop (0);
-
   return ret;
 }
diff --git a/libpthread/nptl/pthread_getschedparam.c b/libpthread/nptl/pthread_getschedparam.c
index 64b15cd..10ad271 100644
--- a/libpthread/nptl/pthread_getschedparam.c
+++ b/libpthread/nptl/pthread_getschedparam.c
@@ -38,10 +38,6 @@ __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
@@ -74,8 +70,6 @@ __pthread_getschedparam (threadid, policy, param)
 
   lll_unlock (pd->lock);
 
-  pthread_cleanup_pop (0);
-
   return result;
 }
 strong_alias (__pthread_getschedparam, pthread_getschedparam)
diff --git a/libpthread/nptl/pthread_setschedparam.c b/libpthread/nptl/pthread_setschedparam.c
index c72116b..71c2f9b 100644
--- a/libpthread/nptl/pthread_setschedparam.c
+++ b/libpthread/nptl/pthread_setschedparam.c
@@ -39,10 +39,6 @@ __pthread_setschedparam (threadid, policy, param)
 
   int result = 0;
 
-  /* We have to handle cancellation in the following code since we are
-     locking another threads desriptor.  */
-  pthread_cleanup_push ((void (*) (void *)) lll_unlock_wake_cb, &pd->lock);
-
   lll_lock (pd->lock);
 
   /* Try to set the scheduler information.  */
@@ -60,8 +56,6 @@ __pthread_setschedparam (threadid, policy, param)
 
   lll_unlock (pd->lock);
 
-  pthread_cleanup_pop (0);
-
   return result;
 }
 strong_alias (__pthread_setschedparam, pthread_setschedparam)
diff --git a/libpthread/nptl/pthread_setschedprio.c b/libpthread/nptl/pthread_setschedprio.c
index 063f523..e7ea4b7 100644
--- a/libpthread/nptl/pthread_setschedprio.c
+++ b/libpthread/nptl/pthread_setschedprio.c
@@ -41,10 +41,6 @@ pthread_setschedprio (threadid, prio)
   struct sched_param param;
   param.sched_priority = prio;
 
-  /* We have to handle cancellation in the following code since we are
-     locking another threads desriptor.  */
-  pthread_cleanup_push ((void (*) (void *)) lll_unlock_wake_cb, &pd->lock);
-
   lll_lock (pd->lock);
 
   /* Try to set the scheduler information.  */
@@ -60,7 +56,5 @@ pthread_setschedprio (threadid, prio)
 
   lll_unlock (pd->lock);
 
-  pthread_cleanup_pop (0);
-
   return result;
 }
-- 
1.6.3.3



More information about the uClibc-cvs mailing list