mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-30 22:43:12 +03:00
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):
This commit is contained in:
@ -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) {
|
||||
|
Reference in New Issue
Block a user