about summary refs log tree commit diff
path: root/linuxthreads/manager.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-11-30 21:14:09 +0000
committerUlrich Drepper <drepper@redhat.com>2001-11-30 21:14:09 +0000
commitc3317d1e8bad70cd91bfa6b5d215affae1794a4c (patch)
tree9f227551089153a67b47eb79f7802e632694b842 /linuxthreads/manager.c
parent096f1151253a0bf4da9e64deefe7c99da62a6b52 (diff)
downloadglibc-c3317d1e8bad70cd91bfa6b5d215affae1794a4c.tar.gz
glibc-c3317d1e8bad70cd91bfa6b5d215affae1794a4c.tar.xz
glibc-c3317d1e8bad70cd91bfa6b5d215affae1794a4c.zip
Update.
2001-11-30  Andreas Schwab  <schwab@suse.de>

	* pthread.c (pthread_handle_sigcancel) [THREAD_SELF]: Double check
	that self is the manager thread, and initialize the thread
	register if not.
	(thread_self_stack) [THREAD_SELF]: New function to find self via
	stack pointer.
	* manager.c (pthread_handle_create): Don't block cancel signal any
	more.

	(THREAD_GETMEM_NC):
Diffstat (limited to 'linuxthreads/manager.c')
-rw-r--r--linuxthreads/manager.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/linuxthreads/manager.c b/linuxthreads/manager.c
index b1a4542d69..9e4fcacb48 100644
--- a/linuxthreads/manager.c
+++ b/linuxthreads/manager.c
@@ -534,7 +534,6 @@ static int pthread_handle_create(pthread_t *thread, const pthread_attr_t *attr,
   size_t guardsize = 0;
   int pagesize = __getpagesize();
   int saved_errno;
-  sigset_t newmask, oldmask;
 
   /* First check whether we have to change the policy and if yes, whether
      we can  do this.  Normally this should be done by examining the
@@ -620,11 +619,6 @@ static int pthread_handle_create(pthread_t *thread, const pthread_attr_t *attr,
       if ((mask & (__pthread_threads_events.event_bits[idx]
 		   | event_maskp->event_bits[idx])) != 0)
 	{
-	  /* Block cancel signal in the child until it is fully
-	     initialized.  */
-	  sigemptyset(&newmask);
-	  sigaddset(&newmask, __pthread_sig_cancel);
-	  sigprocmask(SIG_BLOCK, &newmask, &oldmask);
 	  /* Lock the mutex the child will use now so that it will stop.  */
 	  __pthread_lock(new_thread->p_lock, NULL);
 
@@ -653,7 +647,6 @@ static int pthread_handle_create(pthread_t *thread, const pthread_attr_t *attr,
 			__pthread_sig_cancel, new_thread);
 #endif
 	  saved_errno = errno;
-	  sigprocmask(SIG_SETMASK, &oldmask, NULL);
 	  if (pid != -1)
 	    {
 	      /* Now fill in the information about the new thread in
@@ -679,11 +672,6 @@ static int pthread_handle_create(pthread_t *thread, const pthread_attr_t *attr,
     }
   if (pid == 0)
     {
-      /* Block cancel signal in the child until it is fully
-	 initialized.  */
-      sigemptyset(&newmask);
-      sigaddset(&newmask, __pthread_sig_cancel);
-      sigprocmask(SIG_BLOCK, &newmask, &oldmask);
 #ifdef NEED_SEPARATE_REGISTER_STACK
       pid = __clone2(pthread_start_thread,
 		     (void **)new_thread_bottom,
@@ -700,7 +688,6 @@ static int pthread_handle_create(pthread_t *thread, const pthread_attr_t *attr,
 		    __pthread_sig_cancel, new_thread);
 #endif /* !NEED_SEPARATE_REGISTER_STACK */
       saved_errno = errno;
-      sigprocmask(SIG_SETMASK, &oldmask, NULL);
     }
   /* Check if cloning succeeded */
   if (pid == -1) {