diff options
author | Ulrich Drepper <drepper@redhat.com> | 1998-12-21 12:25:07 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1998-12-21 12:25:07 +0000 |
commit | d17a729b483109285ac4913c3fe4f2c620b87fc6 (patch) | |
tree | 17c9ddc622b007d816c3b1a9d4e2499dde926da3 /linuxthreads | |
parent | 095827866f985081ad64a5eea34c0fe5df854e32 (diff) | |
download | glibc-d17a729b483109285ac4913c3fe4f2c620b87fc6.zip glibc-d17a729b483109285ac4913c3fe4f2c620b87fc6.tar.gz glibc-d17a729b483109285ac4913c3fe4f2c620b87fc6.tar.bz2 |
Update.
1998-12-21 Ulrich Drepper <drepper@cygnus.com>
* inet/gethstbynm_r.c: Remove NEED__RES definition since we do this
anyway for digits_dots.c.
* nss/getXXbyYY.c: Initialize _res before using digits_dots.c
functions.
* nss/getXXbyYY_r.c: Likewise.
1998-12-19 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
* sunrpc/key_call.c (getkeyserv_handle): Use __fcntl instead of
fcntl.
1998-12-20 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
* locale/weight.h (get_weight): Extract string elements as
unsigned values.
Diffstat (limited to 'linuxthreads')
-rw-r--r-- | linuxthreads/manager.c | 8 | ||||
-rw-r--r-- | linuxthreads/pthread.c | 22 | ||||
-rw-r--r-- | linuxthreads/sysdeps/i386/i686/pt-machine.h | 3 | ||||
-rw-r--r-- | linuxthreads/sysdeps/i386/pt-machine.h | 3 |
4 files changed, 17 insertions, 19 deletions
diff --git a/linuxthreads/manager.c b/linuxthreads/manager.c index eafff3f..5a5420d 100644 --- a/linuxthreads/manager.c +++ b/linuxthreads/manager.c @@ -101,11 +101,9 @@ int __pthread_manager(void *arg) /* Set the error variable. */ __pthread_manager_thread.p_errnop = &__pthread_manager_thread.p_errno; __pthread_manager_thread.p_h_errnop = &__pthread_manager_thread.p_h_errno; - /* Block all signals except __pthread_sig_restart, __pthread_sig_cancel - and SIGTRAP */ + /* Block all signals except __pthread_sig_cancel and SIGTRAP */ sigfillset(&mask); - sigdelset(&mask, __pthread_sig_restart); - sigdelset(&mask, __pthread_sig_cancel); /* for debugging new threads */ + sigdelset(&mask, __pthread_sig_cancel); /* for thread termination */ sigdelset(&mask, SIGTRAP); /* for debugging purposes */ sigprocmask(SIG_SETMASK, &mask, NULL); /* Raise our priority to match that of main thread */ @@ -378,7 +376,7 @@ static int pthread_handle_create(pthread_t *thread, const pthread_attr_t *attr, #ifdef CLONE_PTRACE CLONE_PTRACE | #endif - __pthread_sig_restart, new_thread); + __pthread_sig_cancel, new_thread); /* Check if cloning succeeded */ if (pid == -1) { /* Free the stack if we allocated it */ diff --git a/linuxthreads/pthread.c b/linuxthreads/pthread.c index 004c346..8d892b7 100644 --- a/linuxthreads/pthread.c +++ b/linuxthreads/pthread.c @@ -459,9 +459,7 @@ static void pthread_exit_process(int retcode, void *arg) /* The handler for the RESTART signal just records the signal received in the thread descriptor, and optionally performs a siglongjmp - (for pthread_cond_timedwait). - For the thread manager thread, redirect the signal to - __pthread_manager_sighandler. */ + (for pthread_cond_timedwait). */ #ifndef __i386__ static void pthread_handle_sigrestart(int sig) @@ -474,18 +472,15 @@ static void pthread_handle_sigrestart(int sig, struct sigcontext ctx) asm volatile ("movw %w0,%%gs" : : "r" (ctx.gs)); self = thread_self(); #endif - if (self == &__pthread_manager_thread) { - __pthread_manager_sighandler(sig); - } else { - THREAD_SETMEM(self, p_signal, sig); - if (THREAD_GETMEM(self, p_signal_jmp) != NULL) - siglongjmp(*THREAD_GETMEM(self, p_signal_jmp), 1); - } + THREAD_SETMEM(self, p_signal, sig); + if (THREAD_GETMEM(self, p_signal_jmp) != NULL) + siglongjmp(*THREAD_GETMEM(self, p_signal_jmp), 1); } /* The handler for the CANCEL signal checks for cancellation (in asynchronous mode), for process-wide exit and exec requests. - For the thread manager thread, we ignore the signal. + For the thread manager thread, redirect the signal to + __pthread_manager_sighandler. The debugging strategy is as follows: On reception of a REQ_DEBUG request (sent by new threads created to the thread manager under debugging mode), the thread manager throws @@ -510,7 +505,10 @@ static void pthread_handle_sigcancel(int sig, struct sigcontext ctx) #endif if (self == &__pthread_manager_thread) - return; + { + __pthread_manager_sighandler(sig); + return; + } if (__pthread_exit_requested) { /* Main thread should accumulate times for thread manager and its children, so that timings for main thread account for all threads. */ diff --git a/linuxthreads/sysdeps/i386/i686/pt-machine.h b/linuxthreads/sysdeps/i386/i686/pt-machine.h index 1b193a0..91dfb46 100644 --- a/linuxthreads/sysdeps/i386/i686/pt-machine.h +++ b/linuxthreads/sysdeps/i386/i686/pt-machine.h @@ -57,7 +57,8 @@ __compare_and_swap (long int *p, long int oldval, long int newval) __asm__ __volatile__ ("lock; cmpxchgl %3, %1; sete %0" : "=q" (ret), "=m" (*p), "=a" (readval) - : "r" (newval), "m" (*p), "a" (oldval)); + : "r" (newval), "m" (*p), "a" (oldval) + : "memory"); return ret; } diff --git a/linuxthreads/sysdeps/i386/pt-machine.h b/linuxthreads/sysdeps/i386/pt-machine.h index 8859946..97d75d4 100644 --- a/linuxthreads/sysdeps/i386/pt-machine.h +++ b/linuxthreads/sysdeps/i386/pt-machine.h @@ -60,7 +60,8 @@ __compare_and_swap (long int *p, long int oldval, long int newval) __asm__ __volatile__ ("lock; cmpxchgl %3, %1; sete %0" : "=q" (ret), "=m" (*p), "=a" (readval) - : "r" (newval), "m" (*p), "a" (oldval)); + : "r" (newval), "m" (*p), "a" (oldval) + : "memory"); return ret; } |