svn commit: branches/uClibc-nptl: libc/pwd_grp libc/signal libc/stdlib lib etc...
sjhill at uclibc.org
sjhill at uclibc.org
Thu Dec 8 04:57:36 UTC 2005
Author: sjhill
Date: 2005-12-07 20:57:34 -0800 (Wed, 07 Dec 2005)
New Revision: 12720
Log:
Fix 'sigaction' for NPTL and other thread models.
Modified:
branches/uClibc-nptl/libc/pwd_grp/lckpwdf.c
branches/uClibc-nptl/libc/signal/sigaction.c
branches/uClibc-nptl/libc/signal/sigignore.c
branches/uClibc-nptl/libc/signal/sigintr.c
branches/uClibc-nptl/libc/signal/signal.c
branches/uClibc-nptl/libc/signal/sigset.c
branches/uClibc-nptl/libc/signal/sysv_signal.c
branches/uClibc-nptl/libc/stdlib/abort.c
branches/uClibc-nptl/libc/sysdeps/linux/common/__syscall_rt_sigaction.c
branches/uClibc-nptl/libc/sysdeps/linux/common/ssp.c
branches/uClibc-nptl/libc/sysdeps/linux/mips/sigaction.c
branches/uClibc-nptl/libc/unistd/sleep.c
branches/uClibc-nptl/libpthread/nptl/init.c
branches/uClibc-nptl/libpthread/nptl/sysdeps/pthread/sigaction.c
Changeset:
Modified: branches/uClibc-nptl/libc/pwd_grp/lckpwdf.c
===================================================================
--- branches/uClibc-nptl/libc/pwd_grp/lckpwdf.c 2005-12-08 04:53:18 UTC (rev 12719)
+++ branches/uClibc-nptl/libc/pwd_grp/lckpwdf.c 2005-12-08 04:57:34 UTC (rev 12720)
@@ -20,7 +20,6 @@
Boston, MA 02111-1307, USA. */
#define sigfillset __sigfillset_internal
-#define sigaction __sigaction_internal
#include <features.h>
#include <fcntl.h>
Modified: branches/uClibc-nptl/libc/signal/sigaction.c
===================================================================
--- branches/uClibc-nptl/libc/signal/sigaction.c 2005-12-08 04:53:18 UTC (rev 12719)
+++ branches/uClibc-nptl/libc/signal/sigaction.c 2005-12-08 04:57:34 UTC (rev 12720)
@@ -28,17 +28,12 @@
translate it here. */
#include <bits/kernel_sigaction.h>
-int __libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oact);
-
#if defined __NR_rt_sigaction
/* If ACT is not NULL, change the action for SIG to *ACT.
If OACT is not NULL, put the old action for SIG in *OACT. */
-int
-__libc_sigaction (sig, act, oact)
- int sig;
- const struct sigaction *act;
- struct sigaction *oact;
+int attribute_hidden
+__sigaction_internal (int sig, const struct sigaction *act, struct sigaction *oact)
{
int result;
struct kernel_sigaction kact, koact;
@@ -74,11 +69,8 @@
/* If ACT is not NULL, change the action for SIG to *ACT.
If OACT is not NULL, put the old action for SIG in *OACT. */
-int
-__libc_sigaction (sig, act, oact)
- int sig;
- const struct sigaction *act;
- struct sigaction *oact;
+int attribute_hidden
+__sigaction_internal (int sig, const struct sigaction *act, struct sigaction *oact)
{
int result;
struct old_kernel_sigaction kact, koact;
@@ -111,6 +103,7 @@
#endif
#ifndef LIBC_SIGACTION
-weak_alias (__libc_sigaction, __sigaction)
-weak_alias (__libc_sigaction, sigaction)
+strong_alias(__sigaction_internal,__libc_sigaction)
+weak_alias(__sigaction_internal,__sigaction)
+weak_alias(__sigaction_internal,sigaction)
#endif
Modified: branches/uClibc-nptl/libc/signal/sigignore.c
===================================================================
--- branches/uClibc-nptl/libc/signal/sigignore.c 2005-12-08 04:53:18 UTC (rev 12719)
+++ branches/uClibc-nptl/libc/signal/sigignore.c 2005-12-08 04:57:34 UTC (rev 12720)
@@ -18,8 +18,6 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#define sigaction __sigaction_internal
-
#define _GNU_SOURCE
#include <errno.h>
#define __need_NULL
Modified: branches/uClibc-nptl/libc/signal/sigintr.c
===================================================================
--- branches/uClibc-nptl/libc/signal/sigintr.c 2005-12-08 04:53:18 UTC (rev 12719)
+++ branches/uClibc-nptl/libc/signal/sigintr.c 2005-12-08 04:57:34 UTC (rev 12720)
@@ -16,8 +16,6 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#define sigaction __sigaction_internal
-
#include <stddef.h>
#include <signal.h>
#include <errno.h>
Modified: branches/uClibc-nptl/libc/signal/signal.c
===================================================================
--- branches/uClibc-nptl/libc/signal/signal.c 2005-12-08 04:53:18 UTC (rev 12719)
+++ branches/uClibc-nptl/libc/signal/signal.c 2005-12-08 04:57:34 UTC (rev 12720)
@@ -18,8 +18,6 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#define sigaction __sigaction_internal
-
#include <errno.h>
#include <signal.h>
#include <string.h> /* For the real memset prototype. */
Modified: branches/uClibc-nptl/libc/signal/sigset.c
===================================================================
--- branches/uClibc-nptl/libc/signal/sigset.c 2005-12-08 04:53:18 UTC (rev 12719)
+++ branches/uClibc-nptl/libc/signal/sigset.c 2005-12-08 04:57:34 UTC (rev 12720)
@@ -16,8 +16,6 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#define sigaction __sigaction_internal
-
#include <errno.h>
#define __need_NULL
#include <stddef.h>
Modified: branches/uClibc-nptl/libc/signal/sysv_signal.c
===================================================================
--- branches/uClibc-nptl/libc/signal/sysv_signal.c 2005-12-08 04:53:18 UTC (rev 12719)
+++ branches/uClibc-nptl/libc/signal/sysv_signal.c 2005-12-08 04:57:34 UTC (rev 12720)
@@ -16,8 +16,6 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#define sigaction __sigaction_internal
-
#include <errno.h>
#include <signal.h>
#include <string.h> /* For the real memset prototype. */
Modified: branches/uClibc-nptl/libc/stdlib/abort.c
===================================================================
--- branches/uClibc-nptl/libc/stdlib/abort.c 2005-12-08 04:53:18 UTC (rev 12719)
+++ branches/uClibc-nptl/libc/stdlib/abort.c 2005-12-08 04:57:34 UTC (rev 12720)
@@ -18,8 +18,6 @@
/* Hacked up for uClibc by Erik Andersen */
-#define sigaction __sigaction_internal
-
#define _GNU_SOURCE
#include <features.h>
#include <signal.h>
Modified: branches/uClibc-nptl/libc/sysdeps/linux/common/__syscall_rt_sigaction.c
===================================================================
--- branches/uClibc-nptl/libc/sysdeps/linux/common/__syscall_rt_sigaction.c 2005-12-08 04:53:18 UTC (rev 12719)
+++ branches/uClibc-nptl/libc/sysdeps/linux/common/__syscall_rt_sigaction.c 2005-12-08 04:57:34 UTC (rev 12720)
@@ -14,7 +14,7 @@
#define __NR___syscall_rt_sigaction __NR_rt_sigaction
#undef sigaction
-attribute_hidden _syscall4(int, __syscall_rt_sigaction, int, signum,
+_syscall4(int, __syscall_rt_sigaction, int, signum,
const struct sigaction *, act, struct sigaction *, oldact,
size_t, size);
Modified: branches/uClibc-nptl/libc/sysdeps/linux/common/ssp.c
===================================================================
--- branches/uClibc-nptl/libc/sysdeps/linux/common/ssp.c 2005-12-08 04:53:18 UTC (rev 12719)
+++ branches/uClibc-nptl/libc/sysdeps/linux/common/ssp.c 2005-12-08 04:57:34 UTC (rev 12720)
@@ -31,7 +31,6 @@
#define closelog __closelog
#define sigfillset __sigfillset_internal
#define sigdelset __sigdelset_internal
-#define sigaction __sigaction_internal
#define kill __kill
#include <string.h>
Modified: branches/uClibc-nptl/libc/sysdeps/linux/mips/sigaction.c
===================================================================
--- branches/uClibc-nptl/libc/sysdeps/linux/mips/sigaction.c 2005-12-08 04:53:18 UTC (rev 12719)
+++ branches/uClibc-nptl/libc/sysdeps/linux/mips/sigaction.c 2005-12-08 04:57:34 UTC (rev 12720)
@@ -25,14 +25,14 @@
#include <sys/syscall.h>
#include <bits/kernel_sigaction.h>
+#define SA_RESTORER 0x04000000
+
#if defined __NR_rt_sigaction
-#warning "Yes there is a warning here. Don't worry about it."
-static void restore_rt (void) asm ("__restore_rt");
/* If ACT is not NULL, change the action for SIG to *ACT.
If OACT is not NULL, put the old action for SIG in *OACT. */
-int __libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oact)
+int attribute_hidden __sigaction_internal (int sig, const struct sigaction *act, struct sigaction *oact)
{
int result;
struct kernel_sigaction kact, koact;
@@ -68,12 +68,11 @@
#else
-#warning "Yes there is a warning here. Don't worry about it."
-static void restore (void) asm ("__restore");
+extern void restore (void) asm ("__restore") attribute_hidden;
/* If ACT is not NULL, change the action for SIG to *ACT.
If OACT is not NULL, put the old action for SIG in *OACT. */
-int __libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oact)
+int attribute_hidden __sigaction_internal (int sig, const struct sigaction *act, struct sigaction *oact)
{
int result;
struct old_kernel_sigaction kact, koact;
@@ -113,5 +112,5 @@
#endif
#ifndef LIBC_SIGACTION
-weak_alias (__libc_sigaction, sigaction)
+weak_alias(__sigaction_internal,sigaction)
#endif
Modified: branches/uClibc-nptl/libc/unistd/sleep.c
===================================================================
--- branches/uClibc-nptl/libc/unistd/sleep.c 2005-12-08 04:53:18 UTC (rev 12719)
+++ branches/uClibc-nptl/libc/unistd/sleep.c 2005-12-08 04:57:34 UTC (rev 12720)
@@ -18,8 +18,6 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#define sigaction __sigaction_internal
-
#include <errno.h>
#include <time.h>
#include <signal.h>
Modified: branches/uClibc-nptl/libpthread/nptl/init.c
===================================================================
--- branches/uClibc-nptl/libpthread/nptl/init.c 2005-12-08 04:53:18 UTC (rev 12719)
+++ branches/uClibc-nptl/libpthread/nptl/init.c 2005-12-08 04:57:34 UTC (rev 12720)
@@ -264,13 +264,13 @@
sa.sa_flags = SA_SIGINFO;
__sigemptyset (&sa.sa_mask);
- (void) __libc_sigaction (SIGCANCEL, &sa, NULL);
+ (void) __sigaction_internal (SIGCANCEL, &sa, NULL);
/* Install the handle to change the threads' uid/gid. */
sa.sa_sigaction = sighandler_setxid;
sa.sa_flags = SA_SIGINFO | SA_RESTART;
- (void) __libc_sigaction (SIGSETXID, &sa, NULL);
+ (void) __sigaction_internal (SIGSETXID, &sa, NULL);
/* The parent process might have left the signals blocked. Just in
case, unblock it. We reuse the signal mask in the sigaction
Modified: branches/uClibc-nptl/libpthread/nptl/sysdeps/pthread/sigaction.c
===================================================================
--- branches/uClibc-nptl/libpthread/nptl/sysdeps/pthread/sigaction.c 2005-12-08 04:53:18 UTC (rev 12719)
+++ branches/uClibc-nptl/libpthread/nptl/sysdeps/pthread/sigaction.c 2005-12-08 04:57:34 UTC (rev 12720)
@@ -42,10 +42,9 @@
return -1;
}
- return __libc_sigaction (sig, act, oact);
+ return __sigaction_internal (sig, act, oact);
}
-libc_hidden_weak (__sigaction)
-weak_alias (__sigaction, sigaction)
+weak_alias(__sigaction, sigaction)
#else
More information about the uClibc-cvs
mailing list