mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-28 00:21:52 +03:00
Remove __ASSUME_TGKILL.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2012-08-08 Joseph Myers <joseph@codesourcery.com>
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_TGKILL):
|
||||||
|
Remove.
|
||||||
|
|
||||||
2012-08-08 Roland McGrath <roland@hack.frob.com>
|
2012-08-08 Roland McGrath <roland@hack.frob.com>
|
||||||
|
|
||||||
* sysdeps/posix/fdopendir.c: Include <stddef.h>.
|
* sysdeps/posix/fdopendir.c: Include <stddef.h>.
|
||||||
|
@ -1,3 +1,26 @@
|
|||||||
|
2012-08-08 Joseph Myers <joseph@codesourcery.com>
|
||||||
|
|
||||||
|
* allocatestack.c (setxid_signal_thread) [__ASSUME_TGKILL]: Make
|
||||||
|
code unconditional.
|
||||||
|
(setxid_signal_thread) [!__ASSUME_TGKILL]: Remove conditional code.
|
||||||
|
* pthread_cancel.c (pthread_cancel) [__ASSUME_TGKILL]: Make code
|
||||||
|
unconditional.
|
||||||
|
(pthread_cancel) [!__ASSUME_TGKILL]: Remove conditional code.
|
||||||
|
* sysdeps/pthread/createthread.c (do_clone) [__ASSUME_TGKILL]:
|
||||||
|
Make code unconditional.
|
||||||
|
(do_clone) [!__ASSUME_TGKILL]: Remove conditional code.
|
||||||
|
* sysdeps/unix/sysv/linux/pt-raise.c (raise) [__ASSUME_TGKILL ||
|
||||||
|
__NR_tgkill]: Make code unconditional.
|
||||||
|
(raise) [__ASSUME_TGKILL]: Likewise.
|
||||||
|
(raise) [!__ASSUME_TGKILL]: Remove conditional code.
|
||||||
|
* sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill)
|
||||||
|
[__ASSUME_TGKILL]: Make code unconditional.
|
||||||
|
(__pthread_kill) [!__ASSUME_TGKILL]: Remove conditional code.
|
||||||
|
* sysdeps/unix/sysv/linux/raise.c (raise) [__ASSUME_TGKILL ||
|
||||||
|
__NR_tgkill]: Make code unconditional.
|
||||||
|
(raise) [__ASSUME_TGKILL]: Likewise.
|
||||||
|
(raise) [!__ASSUME_TGKILL]: Remove conditional code.
|
||||||
|
|
||||||
2012-08-07 Joseph Myers <joseph@codesourcery.com>
|
2012-08-07 Joseph Myers <joseph@codesourcery.com>
|
||||||
|
|
||||||
* sysdeps/pthread/createthread.c (create_thread)
|
* sysdeps/pthread/createthread.c (create_thread)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* Copyright (C) 2002-2007, 2009, 2010, 2011 Free Software Foundation, Inc.
|
/* Copyright (C) 2002-2012 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
|
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
|
||||||
|
|
||||||
@ -1037,18 +1037,8 @@ setxid_signal_thread (struct xid_command *cmdp, struct pthread *t)
|
|||||||
|
|
||||||
int val;
|
int val;
|
||||||
INTERNAL_SYSCALL_DECL (err);
|
INTERNAL_SYSCALL_DECL (err);
|
||||||
#if __ASSUME_TGKILL
|
|
||||||
val = INTERNAL_SYSCALL (tgkill, err, 3, THREAD_GETMEM (THREAD_SELF, pid),
|
val = INTERNAL_SYSCALL (tgkill, err, 3, THREAD_GETMEM (THREAD_SELF, pid),
|
||||||
t->tid, SIGSETXID);
|
t->tid, SIGSETXID);
|
||||||
#else
|
|
||||||
# ifdef __NR_tgkill
|
|
||||||
val = INTERNAL_SYSCALL (tgkill, err, 3, THREAD_GETMEM (THREAD_SELF, pid),
|
|
||||||
t->tid, SIGSETXID);
|
|
||||||
if (INTERNAL_SYSCALL_ERROR_P (val, err)
|
|
||||||
&& INTERNAL_SYSCALL_ERRNO (val, err) == ENOSYS)
|
|
||||||
# endif
|
|
||||||
val = INTERNAL_SYSCALL (tkill, err, 2, t->tid, SIGSETXID);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* If this failed, it must have had not started yet or else exited. */
|
/* If this failed, it must have had not started yet or else exited. */
|
||||||
if (!INTERNAL_SYSCALL_ERROR_P (val, err))
|
if (!INTERNAL_SYSCALL_ERROR_P (val, err))
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* Copyright (C) 2002, 2003, 2004, 2009 Free Software Foundation, Inc.
|
/* Copyright (C) 2002-2012 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
|
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
|
||||||
|
|
||||||
@ -75,20 +75,9 @@ pthread_cancel (th)
|
|||||||
a signal handler. But this is no allowed, pthread_cancel
|
a signal handler. But this is no allowed, pthread_cancel
|
||||||
is not guaranteed to be async-safe. */
|
is not guaranteed to be async-safe. */
|
||||||
int val;
|
int val;
|
||||||
#if __ASSUME_TGKILL
|
|
||||||
val = INTERNAL_SYSCALL (tgkill, err, 3,
|
val = INTERNAL_SYSCALL (tgkill, err, 3,
|
||||||
THREAD_GETMEM (THREAD_SELF, pid), pd->tid,
|
THREAD_GETMEM (THREAD_SELF, pid), pd->tid,
|
||||||
SIGCANCEL);
|
SIGCANCEL);
|
||||||
#else
|
|
||||||
# ifdef __NR_tgkill
|
|
||||||
val = INTERNAL_SYSCALL (tgkill, err, 3,
|
|
||||||
THREAD_GETMEM (THREAD_SELF, pid), pd->tid,
|
|
||||||
SIGCANCEL);
|
|
||||||
if (INTERNAL_SYSCALL_ERROR_P (val, err)
|
|
||||||
&& INTERNAL_SYSCALL_ERRNO (val, err) == ENOSYS)
|
|
||||||
# endif
|
|
||||||
val = INTERNAL_SYSCALL (tkill, err, 2, pd->tid, SIGCANCEL);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (INTERNAL_SYSCALL_ERROR_P (val, err))
|
if (INTERNAL_SYSCALL_ERROR_P (val, err))
|
||||||
result = INTERNAL_SYSCALL_ERRNO (val, err);
|
result = INTERNAL_SYSCALL_ERRNO (val, err);
|
||||||
|
@ -109,13 +109,9 @@ do_clone (struct pthread *pd, const struct pthread_attr *attr,
|
|||||||
send it the cancellation signal. */
|
send it the cancellation signal. */
|
||||||
INTERNAL_SYSCALL_DECL (err2);
|
INTERNAL_SYSCALL_DECL (err2);
|
||||||
err_out:
|
err_out:
|
||||||
#if __ASSUME_TGKILL
|
|
||||||
(void) INTERNAL_SYSCALL (tgkill, err2, 3,
|
(void) INTERNAL_SYSCALL (tgkill, err2, 3,
|
||||||
THREAD_GETMEM (THREAD_SELF, pid),
|
THREAD_GETMEM (THREAD_SELF, pid),
|
||||||
pd->tid, SIGCANCEL);
|
pd->tid, SIGCANCEL);
|
||||||
#else
|
|
||||||
(void) INTERNAL_SYSCALL (tkill, err2, 2, pd->tid, SIGCANCEL);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* We do not free the stack here because the canceled thread
|
/* We do not free the stack here because the canceled thread
|
||||||
itself will do this. */
|
itself will do this. */
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
|
/* Copyright (C) 2002-2012 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
|
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
|
||||||
|
|
||||||
@ -27,25 +27,13 @@ int
|
|||||||
raise (sig)
|
raise (sig)
|
||||||
int sig;
|
int sig;
|
||||||
{
|
{
|
||||||
#if __ASSUME_TGKILL || defined __NR_tgkill
|
|
||||||
/* raise is an async-safe function. It could be called while the
|
/* raise is an async-safe function. It could be called while the
|
||||||
fork function temporarily invalidated the PID field. Adjust for
|
fork function temporarily invalidated the PID field. Adjust for
|
||||||
that. */
|
that. */
|
||||||
pid_t pid = THREAD_GETMEM (THREAD_SELF, pid);
|
pid_t pid = THREAD_GETMEM (THREAD_SELF, pid);
|
||||||
if (__builtin_expect (pid < 0, 0))
|
if (__builtin_expect (pid < 0, 0))
|
||||||
pid = -pid;
|
pid = -pid;
|
||||||
#endif
|
|
||||||
|
|
||||||
#if __ASSUME_TGKILL
|
|
||||||
return INLINE_SYSCALL (tgkill, 3, pid, THREAD_GETMEM (THREAD_SELF, tid),
|
return INLINE_SYSCALL (tgkill, 3, pid, THREAD_GETMEM (THREAD_SELF, tid),
|
||||||
sig);
|
sig);
|
||||||
#else
|
|
||||||
# ifdef __NR_tgkill
|
|
||||||
int res = INLINE_SYSCALL (tgkill, 3, pid, THREAD_GETMEM (THREAD_SELF, tid),
|
|
||||||
sig);
|
|
||||||
if (res != -1 || errno != ENOSYS)
|
|
||||||
return res;
|
|
||||||
# endif
|
|
||||||
return INLINE_SYSCALL (tkill, 2, THREAD_GETMEM (THREAD_SELF, tid), sig);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* Copyright (C) 2002, 2003, 2004, 2006, 2011 Free Software Foundation, Inc.
|
/* Copyright (C) 2002-2012 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
|
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
|
||||||
|
|
||||||
@ -58,18 +58,8 @@ __pthread_kill (threadid, signo)
|
|||||||
fork, it would have to happen in a signal handler. But this is
|
fork, it would have to happen in a signal handler. But this is
|
||||||
no allowed, pthread_kill is not guaranteed to be async-safe. */
|
no allowed, pthread_kill is not guaranteed to be async-safe. */
|
||||||
int val;
|
int val;
|
||||||
#if __ASSUME_TGKILL
|
|
||||||
val = INTERNAL_SYSCALL (tgkill, err, 3, THREAD_GETMEM (THREAD_SELF, pid),
|
val = INTERNAL_SYSCALL (tgkill, err, 3, THREAD_GETMEM (THREAD_SELF, pid),
|
||||||
tid, signo);
|
tid, signo);
|
||||||
#else
|
|
||||||
# ifdef __NR_tgkill
|
|
||||||
val = INTERNAL_SYSCALL (tgkill, err, 3, THREAD_GETMEM (THREAD_SELF, pid),
|
|
||||||
tid, signo);
|
|
||||||
if (INTERNAL_SYSCALL_ERROR_P (val, err)
|
|
||||||
&& INTERNAL_SYSCALL_ERRNO (val, err) == ENOSYS)
|
|
||||||
# endif
|
|
||||||
val = INTERNAL_SYSCALL (tkill, err, 2, tid, signo);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return (INTERNAL_SYSCALL_ERROR_P (val, err)
|
return (INTERNAL_SYSCALL_ERROR_P (val, err)
|
||||||
? INTERNAL_SYSCALL_ERRNO (val, err) : 0);
|
? INTERNAL_SYSCALL_ERRNO (val, err) : 0);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
|
/* Copyright (C) 2002-2012 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
|
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
|
||||||
|
|
||||||
@ -29,9 +29,7 @@ raise (sig)
|
|||||||
int sig;
|
int sig;
|
||||||
{
|
{
|
||||||
struct pthread *pd = THREAD_SELF;
|
struct pthread *pd = THREAD_SELF;
|
||||||
#if __ASSUME_TGKILL || defined __NR_tgkill
|
|
||||||
pid_t pid = THREAD_GETMEM (pd, pid);
|
pid_t pid = THREAD_GETMEM (pd, pid);
|
||||||
#endif
|
|
||||||
pid_t selftid = THREAD_GETMEM (pd, tid);
|
pid_t selftid = THREAD_GETMEM (pd, tid);
|
||||||
if (selftid == 0)
|
if (selftid == 0)
|
||||||
{
|
{
|
||||||
@ -44,31 +42,18 @@ raise (sig)
|
|||||||
#endif
|
#endif
|
||||||
THREAD_SETMEM (pd, tid, selftid);
|
THREAD_SETMEM (pd, tid, selftid);
|
||||||
|
|
||||||
#if __ASSUME_TGKILL || defined __NR_tgkill
|
|
||||||
/* We do not set the PID field in the TID here since we might be
|
/* We do not set the PID field in the TID here since we might be
|
||||||
called from a signal handler while the thread executes fork. */
|
called from a signal handler while the thread executes fork. */
|
||||||
pid = selftid;
|
pid = selftid;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
#if __ASSUME_TGKILL || defined __NR_tgkill
|
|
||||||
else
|
else
|
||||||
/* raise is an async-safe function. It could be called while the
|
/* raise is an async-safe function. It could be called while the
|
||||||
fork/vfork function temporarily invalidated the PID field. Adjust for
|
fork/vfork function temporarily invalidated the PID field. Adjust for
|
||||||
that. */
|
that. */
|
||||||
if (__builtin_expect (pid <= 0, 0))
|
if (__builtin_expect (pid <= 0, 0))
|
||||||
pid = (pid & INT_MAX) == 0 ? selftid : -pid;
|
pid = (pid & INT_MAX) == 0 ? selftid : -pid;
|
||||||
#endif
|
|
||||||
|
|
||||||
#if __ASSUME_TGKILL
|
|
||||||
return INLINE_SYSCALL (tgkill, 3, pid, selftid, sig);
|
return INLINE_SYSCALL (tgkill, 3, pid, selftid, sig);
|
||||||
#else
|
|
||||||
# ifdef __NR_tgkill
|
|
||||||
int res = INLINE_SYSCALL (tgkill, 3, pid, selftid, sig);
|
|
||||||
if (res != -1 || errno != ENOSYS)
|
|
||||||
return res;
|
|
||||||
# endif
|
|
||||||
return INLINE_SYSCALL (tkill, 2, selftid, sig);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
libc_hidden_def (raise)
|
libc_hidden_def (raise)
|
||||||
weak_alias (raise, gsignal)
|
weak_alias (raise, gsignal)
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
2012-08-08 Joseph Myers <joseph@codesourcery.com>
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/alpha/kernel-features.h
|
||||||
|
(__ASSUME_TGKILL): Remove.
|
||||||
|
|
||||||
2012-08-08 Richard Henderson <rth@redhat.com>
|
2012-08-08 Richard Henderson <rth@redhat.com>
|
||||||
|
|
||||||
* sysdeps/unix/sysv/linux/alpha/kernel-features.h
|
* sysdeps/unix/sysv/linux/alpha/kernel-features.h
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
2012-08-08 Joseph Myers <joseph@codesourcery.com>
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/m68k/kernel-features.h
|
||||||
|
(__ASSUME_TGKILL): Remove.
|
||||||
|
|
||||||
2012-08-08 Andreas Schwab <schwab@linux-m68k.org>
|
2012-08-08 Andreas Schwab <schwab@linux-m68k.org>
|
||||||
|
|
||||||
* sysdeps/m68k/coldfire/fpu/bits/mathinline.h: New file.
|
* sysdeps/m68k/coldfire/fpu/bits/mathinline.h: New file.
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
2012-08-08 Joseph Myers <joseph@codesourcery.com>
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/tile/kernel-features.h
|
||||||
|
(__ASSUME_TGKILL): Remove.
|
||||||
|
|
||||||
2012-08-02 Chris Metcalf <cmetcalf@tilera.com>
|
2012-08-02 Chris Metcalf <cmetcalf@tilera.com>
|
||||||
|
|
||||||
* sysdeps/tile/sysdep.h: Do not define ASM_TYPE_DIRECTIVE.
|
* sysdeps/tile/sysdep.h: Do not define ASM_TYPE_DIRECTIVE.
|
||||||
|
@ -20,9 +20,6 @@
|
|||||||
#ifndef _KERNEL_FEATURES_H
|
#ifndef _KERNEL_FEATURES_H
|
||||||
#define _KERNEL_FEATURES_H 1
|
#define _KERNEL_FEATURES_H 1
|
||||||
|
|
||||||
/* The tgkill syscall was introduced for alpha 2.6.0-test1. */
|
|
||||||
#define __ASSUME_TGKILL 1
|
|
||||||
|
|
||||||
#define __ASSUME_UTIMES 1
|
#define __ASSUME_UTIMES 1
|
||||||
|
|
||||||
/* Support for the O_CLOEXEC flag was added for alpha in 2.6.23. */
|
/* Support for the O_CLOEXEC flag was added for alpha in 2.6.23. */
|
||||||
|
@ -22,7 +22,6 @@
|
|||||||
#define __ASSUME_STAT64_SYSCALL 1
|
#define __ASSUME_STAT64_SYSCALL 1
|
||||||
|
|
||||||
/* Many syscalls were added in 2.6.10 for m68k. */
|
/* Many syscalls were added in 2.6.10 for m68k. */
|
||||||
#define __ASSUME_TGKILL 1
|
|
||||||
#define __ASSUME_UTIMES 1
|
#define __ASSUME_UTIMES 1
|
||||||
#define __ASSUME_FADVISE64_64_SYSCALL 1
|
#define __ASSUME_FADVISE64_64_SYSCALL 1
|
||||||
|
|
||||||
|
@ -21,7 +21,6 @@
|
|||||||
#define __ASSUME_MMAP2_SYSCALL 1
|
#define __ASSUME_MMAP2_SYSCALL 1
|
||||||
#define __ASSUME_STAT64_SYSCALL 1
|
#define __ASSUME_STAT64_SYSCALL 1
|
||||||
#define __ASSUME_CLONE_THREAD_FLAGS 1
|
#define __ASSUME_CLONE_THREAD_FLAGS 1
|
||||||
#define __ASSUME_TGKILL 1
|
|
||||||
#define __ASSUME_UTIMES 1
|
#define __ASSUME_UTIMES 1
|
||||||
#define __ASSUME_FADVISE64_64_SYSCALL 1
|
#define __ASSUME_FADVISE64_64_SYSCALL 1
|
||||||
#define __ASSUME_O_CLOEXEC 1
|
#define __ASSUME_O_CLOEXEC 1
|
||||||
|
@ -113,13 +113,6 @@
|
|||||||
/* The statfs64 syscalls are available in 2.5.74 (but not for alpha). */
|
/* The statfs64 syscalls are available in 2.5.74 (but not for alpha). */
|
||||||
#define __ASSUME_STATFS64 1
|
#define __ASSUME_STATFS64 1
|
||||||
|
|
||||||
/* The tgkill syscall was instroduced for i386 in 2.5.75. On x86-64,
|
|
||||||
sparc, SH, ppc, and ppc64 it was introduced in 2.6.0-test3. */
|
|
||||||
#if (defined __i386__ || defined __x86_64__ || defined __powerpc__ \
|
|
||||||
|| defined __sh__ || defined __sparc__)
|
|
||||||
# define __ASSUME_TGKILL 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* The utimes syscall has been available for some architectures
|
/* The utimes syscall has been available for some architectures
|
||||||
forever. For x86 it was introduced after 2.5.75, for x86-64,
|
forever. For x86 it was introduced after 2.5.75, for x86-64,
|
||||||
ppc, and ppc64 it was introduced in 2.6.0-test3. */
|
ppc, and ppc64 it was introduced in 2.6.0-test3. */
|
||||||
|
Reference in New Issue
Block a user