mirror of git://sourceware.org/git/glibc.git
(__pthread_initialize_minimal): Remove unneccesary sigaddset call.
This commit is contained in:
parent
d00453348c
commit
75cddafe47
13
nptl/init.c
13
nptl/init.c
|
|
@ -100,12 +100,6 @@ __attribute ((constructor))
|
||||||
#endif
|
#endif
|
||||||
__pthread_initialize_minimal (void)
|
__pthread_initialize_minimal (void)
|
||||||
{
|
{
|
||||||
struct sigaction sa;
|
|
||||||
struct rlimit limit;
|
|
||||||
#ifdef USE_TLS
|
|
||||||
struct pthread *pd;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef SHARED
|
#ifndef SHARED
|
||||||
/* Unlike in the dynamically linked case the dynamic linker has not
|
/* Unlike in the dynamically linked case the dynamic linker has not
|
||||||
taken care of initializing the TLS data structures. */
|
taken care of initializing the TLS data structures. */
|
||||||
|
|
@ -113,7 +107,7 @@ __pthread_initialize_minimal (void)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Minimal initialization of the thread descriptor. */
|
/* Minimal initialization of the thread descriptor. */
|
||||||
pd = THREAD_SELF;
|
struct pthread *pd = THREAD_SELF;
|
||||||
pd->tid = INTERNAL_SYSCALL (set_tid_address, 1, &pd->tid);
|
pd->tid = INTERNAL_SYSCALL (set_tid_address, 1, &pd->tid);
|
||||||
THREAD_SETMEM (pd, specific[0], &pd->specific_1stblock[0]);
|
THREAD_SETMEM (pd, specific[0], &pd->specific_1stblock[0]);
|
||||||
THREAD_SETMEM (pd, user_stack, true);
|
THREAD_SETMEM (pd, user_stack, true);
|
||||||
|
|
@ -131,18 +125,17 @@ __pthread_initialize_minimal (void)
|
||||||
/* Install the cancellation signal handler. If for some reason we
|
/* Install the cancellation signal handler. If for some reason we
|
||||||
cannot install the handler we do not abort. Maybe we should, but
|
cannot install the handler we do not abort. Maybe we should, but
|
||||||
it is only asynchronous cancellation which is affected. */
|
it is only asynchronous cancellation which is affected. */
|
||||||
|
struct sigaction sa;
|
||||||
sa.sa_handler = sigcancel_handler;
|
sa.sa_handler = sigcancel_handler;
|
||||||
sa.sa_flags = 0;
|
sa.sa_flags = 0;
|
||||||
|
|
||||||
/* Avoid another cancellation signal when we process one. */
|
|
||||||
sigemptyset (&sa.sa_mask);
|
sigemptyset (&sa.sa_mask);
|
||||||
sigaddset (&sa.sa_mask, SIGCANCEL);
|
|
||||||
|
|
||||||
(void) __libc_sigaction (SIGCANCEL, &sa, NULL);
|
(void) __libc_sigaction (SIGCANCEL, &sa, NULL);
|
||||||
|
|
||||||
|
|
||||||
/* Determine the default allowed stack size. This is the size used
|
/* Determine the default allowed stack size. This is the size used
|
||||||
in case the user does not specify one. */
|
in case the user does not specify one. */
|
||||||
|
struct rlimit limit;
|
||||||
if (getrlimit (RLIMIT_STACK, &limit) != 0
|
if (getrlimit (RLIMIT_STACK, &limit) != 0
|
||||||
|| limit.rlim_cur == RLIM_INFINITY)
|
|| limit.rlim_cur == RLIM_INFINITY)
|
||||||
/* The system limit is not usable. Use an architecture-specific
|
/* The system limit is not usable. Use an architecture-specific
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue