Update.
2000-04-16 Ulrich Drepper <drepper@redhat.com> * pthread.c: Correct long-time braino. We never set SA_SIGINFO and therefore don't need the _rt versions of the signal handlers. * internals.h: Declare __pthread_yield.
This commit is contained in:
parent
c269fdb42f
commit
e2947c429e
|
@ -1,8 +1,14 @@
|
||||||
|
2000-04-16 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* pthread.c: Correct long-time braino. We never set SA_SIGINFO and
|
||||||
|
therefore don't need the _rt versions of the signal handlers.
|
||||||
|
|
||||||
2000-04-15 Ulrich Drepper <drepper@redhat.com>
|
2000-04-15 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
* pthread.c (pthread_yield): New function.
|
* pthread.c (pthread_yield): New function.
|
||||||
* sysdeps/pthread/pthread.h (pthread_yield): Add prototype.
|
* sysdeps/pthread/pthread.h (pthread_yield): Add prototype.
|
||||||
* Versions [libpthread] (GLIBC_2.2): Add pthread_yield.
|
* Versions [libpthread] (GLIBC_2.2): Add pthread_yield.
|
||||||
|
* internals.h: Declare __pthread_yield.
|
||||||
|
|
||||||
* pthread.c (pthread_initialize): Avoid a bit more code if
|
* pthread.c (pthread_initialize): Avoid a bit more code if
|
||||||
realtime signals are known to exist.
|
realtime signals are known to exist.
|
||||||
|
|
|
@ -439,6 +439,8 @@ int __pthread_timedsuspend_new(pthread_descr self, const struct timespec *abs);
|
||||||
|
|
||||||
void __pthread_wait_for_restart_signal(pthread_descr self);
|
void __pthread_wait_for_restart_signal(pthread_descr self);
|
||||||
|
|
||||||
|
int __pthread_yield (void);
|
||||||
|
|
||||||
/* Global pointers to old or new suspend functions */
|
/* Global pointers to old or new suspend functions */
|
||||||
|
|
||||||
extern void (*__pthread_restart)(pthread_descr);
|
extern void (*__pthread_restart)(pthread_descr);
|
||||||
|
|
|
@ -197,11 +197,7 @@ static void pthread_handle_sigcancel(int sig);
|
||||||
static void pthread_handle_sigrestart(int sig);
|
static void pthread_handle_sigrestart(int sig);
|
||||||
#ifdef __i386__
|
#ifdef __i386__
|
||||||
static void pthread_handle_sigrestart_nonrt(int sig, struct sigcontext ctx);
|
static void pthread_handle_sigrestart_nonrt(int sig, struct sigcontext ctx);
|
||||||
static void pthread_handle_sigrestart_rt(int sig, struct siginfo *si,
|
|
||||||
struct ucontext *uc);
|
|
||||||
static void pthread_handle_sigcancel_nonrt(int sig, struct sigcontext ctx);
|
static void pthread_handle_sigcancel_nonrt(int sig, struct sigcontext ctx);
|
||||||
static void pthread_handle_sigcancel_rt(int sig, struct siginfo *si,
|
|
||||||
struct ucontext *uc);
|
|
||||||
#endif
|
#endif
|
||||||
static void pthread_handle_sigdebug(int sig);
|
static void pthread_handle_sigdebug(int sig);
|
||||||
|
|
||||||
|
@ -369,12 +365,7 @@ static void pthread_initialize(void)
|
||||||
#ifndef __i386__
|
#ifndef __i386__
|
||||||
sa.sa_handler = pthread_handle_sigrestart;
|
sa.sa_handler = pthread_handle_sigrestart;
|
||||||
#else
|
#else
|
||||||
# if !__ASSUME_REALTIME_SIGNALS
|
sa.sa_handler = (__sighandler_t) pthread_handle_sigrestart_nonrt;
|
||||||
if (__pthread_sig_restart < SIGRTMIN)
|
|
||||||
sa.sa_handler = (__sighandler_t) pthread_handle_sigrestart_nonrt;
|
|
||||||
else
|
|
||||||
# endif
|
|
||||||
sa.sa_handler = (__sighandler_t) pthread_handle_sigrestart_rt;
|
|
||||||
#endif
|
#endif
|
||||||
sigemptyset(&sa.sa_mask);
|
sigemptyset(&sa.sa_mask);
|
||||||
sa.sa_flags = 0;
|
sa.sa_flags = 0;
|
||||||
|
@ -382,12 +373,7 @@ static void pthread_initialize(void)
|
||||||
#ifndef __i386__
|
#ifndef __i386__
|
||||||
sa.sa_handler = pthread_handle_sigcancel;
|
sa.sa_handler = pthread_handle_sigcancel;
|
||||||
#else
|
#else
|
||||||
# if !__ASSUME_REALTIME_SIGNALS
|
sa.sa_handler = (__sighandler_t) pthread_handle_sigcancel_nonrt;
|
||||||
if (__pthread_sig_restart < SIGRTMIN)
|
|
||||||
sa.sa_handler = (__sighandler_t) pthread_handle_sigcancel_nonrt;
|
|
||||||
else
|
|
||||||
# endif
|
|
||||||
sa.sa_handler = (__sighandler_t) pthread_handle_sigcancel_rt;
|
|
||||||
#endif
|
#endif
|
||||||
sa.sa_flags = 0;
|
sa.sa_flags = 0;
|
||||||
__sigaction(__pthread_sig_cancel, &sa, NULL);
|
__sigaction(__pthread_sig_cancel, &sa, NULL);
|
||||||
|
@ -675,20 +661,11 @@ static void pthread_handle_sigrestart(int sig)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __i386__
|
#ifdef __i386__
|
||||||
# if !__ASSUME_REALTIME_SIGNALS
|
|
||||||
static void pthread_handle_sigrestart_nonrt(int sig, struct sigcontext ctx)
|
static void pthread_handle_sigrestart_nonrt(int sig, struct sigcontext ctx)
|
||||||
{
|
{
|
||||||
asm volatile ("movw %w0,%%gs" : : "r" (ctx.gs));
|
asm volatile ("movw %w0,%%gs" : : "r" (ctx.gs));
|
||||||
pthread_handle_sigrestart(sig);
|
pthread_handle_sigrestart(sig);
|
||||||
}
|
}
|
||||||
# endif
|
|
||||||
|
|
||||||
static void pthread_handle_sigrestart_rt(int sig, struct siginfo *si,
|
|
||||||
struct ucontext *uc)
|
|
||||||
{
|
|
||||||
asm volatile ("movw %w0,%%gs" : : "r" (uc->uc_mcontext.gregs[REG_GS]));
|
|
||||||
pthread_handle_sigrestart(sig);
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* The handler for the CANCEL signal checks for cancellation
|
/* The handler for the CANCEL signal checks for cancellation
|
||||||
|
@ -726,20 +703,11 @@ static void pthread_handle_sigcancel(int sig)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __i386__
|
#ifdef __i386__
|
||||||
# if !__ASSUME_REALTIME_SIGNALS
|
|
||||||
static void pthread_handle_sigcancel_nonrt(int sig, struct sigcontext ctx)
|
static void pthread_handle_sigcancel_nonrt(int sig, struct sigcontext ctx)
|
||||||
{
|
{
|
||||||
asm volatile ("movw %w0,%%gs" : : "r" (ctx.gs));
|
asm volatile ("movw %w0,%%gs" : : "r" (ctx.gs));
|
||||||
pthread_handle_sigcancel(sig);
|
pthread_handle_sigcancel(sig);
|
||||||
}
|
}
|
||||||
# endif
|
|
||||||
|
|
||||||
static void pthread_handle_sigcancel_rt(int sig, struct siginfo *si,
|
|
||||||
struct ucontext *uc)
|
|
||||||
{
|
|
||||||
asm volatile ("movw %w0,%%gs" : : "r" (uc->uc_mcontext.gregs[REG_GS]));
|
|
||||||
pthread_handle_sigcancel(sig);
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Handler for the DEBUG signal.
|
/* Handler for the DEBUG signal.
|
||||||
|
|
Loading…
Reference in New Issue