[git commit] signal.h: move prototypes for __syscall_[rt_]sigaction to common place
Bernhard Reutner-Fischer
rep.dot.nop at gmail.com
Fri Jun 15 12:00:22 UTC 2012
commit: http://git.uclibc.org/uClibc/commit/?id=27fbcf79bc05e63f8687e61ce83fb29c77683b4a
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/master
solve inconsistency between archs
NPTL should not use __syscall_rt_sigaction at all, for now it needs to be visible
Signed-off-by: Peter S. Mazinger <ps.m at gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop at gmail.com>
---
include/signal.h | 18 ++++++++++++++++++
libc/sysdeps/linux/alpha/bits/kernel_sigaction.h | 8 --------
libc/sysdeps/linux/common/__syscall_rt_sigaction.c | 7 ++-----
libc/sysdeps/linux/common/__syscall_sigaction.c | 3 +--
libc/sysdeps/linux/common/bits/kernel_sigaction.h | 12 ------------
libc/sysdeps/linux/hppa/bits/kernel_sigaction.h | 8 --------
libc/sysdeps/linux/mips/bits/kernel_sigaction.h | 8 --------
7 files changed, 21 insertions(+), 43 deletions(-)
diff --git a/include/signal.h b/include/signal.h
index a0b3edc..8674b1a 100644
--- a/include/signal.h
+++ b/include/signal.h
@@ -291,6 +291,24 @@ libc_hidden_proto(sigsuspend)
extern int sigaction (int __sig, __const struct sigaction *__restrict __act,
struct sigaction *__restrict __oact) __THROW;
#ifdef _LIBC
+# if 0 /* this is in headers */
+/* In uclibc, userspace struct sigaction is identical to
+ * "new" struct kernel_sigaction (one from the Linux 2.1.68 kernel).
+ * See sigaction.h
+ */
+struct old_kernel_sigaction;
+extern int __syscall_sigaction(int, __const struct old_kernel_sigaction *,
+ struct old_kernel_sigaction *) attribute_hidden;
+# else /* this is how the function is built */
+extern __typeof(sigaction) __syscall_sigaction attribute_hidden;
+# endif
+/* candidate for attribute_hidden, if NPTL would behave */
+extern int __syscall_rt_sigaction(int, __const struct sigaction *,
+ struct sigaction *, size_t)
+# ifndef __UCLIBC_HAS_THREADS_NATIVE__
+ attribute_hidden
+# endif
+ ;
extern __typeof(sigaction) __libc_sigaction;
libc_hidden_proto(sigaction)
#endif
diff --git a/libc/sysdeps/linux/alpha/bits/kernel_sigaction.h b/libc/sysdeps/linux/alpha/bits/kernel_sigaction.h
index cd6b213..7746e30 100644
--- a/libc/sysdeps/linux/alpha/bits/kernel_sigaction.h
+++ b/libc/sysdeps/linux/alpha/bits/kernel_sigaction.h
@@ -9,12 +9,4 @@ struct old_kernel_sigaction {
unsigned int sa_flags;
};
-/* In uclibc, userspace struct sigaction is identical to
- * "new" struct kernel_sigaction (one from the Linux 2.1.68 kernel).
- * See sigaction.h
- */
-
-extern int __syscall_rt_sigaction (int, const struct sigaction *,
- struct sigaction *, size_t) attribute_hidden;
-
#endif
diff --git a/libc/sysdeps/linux/common/__syscall_rt_sigaction.c b/libc/sysdeps/linux/common/__syscall_rt_sigaction.c
index 006b38a..723bf2e 100644
--- a/libc/sysdeps/linux/common/__syscall_rt_sigaction.c
+++ b/libc/sysdeps/linux/common/__syscall_rt_sigaction.c
@@ -12,11 +12,8 @@
#ifdef __NR_rt_sigaction
#include <signal.h>
-int __syscall_rt_sigaction (int __signum, const struct sigaction *__act,
- struct sigaction *__oldact, size_t __size);
-
#define __NR___syscall_rt_sigaction __NR_rt_sigaction
_syscall4(int, __syscall_rt_sigaction, int, signum,
- const struct sigaction *, act, struct sigaction *, oldact,
- size_t, size)
+ const struct sigaction *, act, struct sigaction *, oldact,
+ size_t, size)
#endif
diff --git a/libc/sysdeps/linux/common/__syscall_sigaction.c b/libc/sysdeps/linux/common/__syscall_sigaction.c
index ae0f01e..98e6637 100644
--- a/libc/sysdeps/linux/common/__syscall_sigaction.c
+++ b/libc/sysdeps/linux/common/__syscall_sigaction.c
@@ -12,8 +12,7 @@
#ifndef __NR_rt_sigaction
#define __NR___syscall_sigaction __NR_sigaction
#include <signal.h>
-int __syscall_sigaction (int __signum, const struct sigaction *__act, struct sigaction *__oldact) attribute_hidden;
_syscall3(int, __syscall_sigaction, int, signum, const struct sigaction *,
- act, struct sigaction *, oldact)
+ act, struct sigaction *, oldact)
#endif
diff --git a/libc/sysdeps/linux/common/bits/kernel_sigaction.h b/libc/sysdeps/linux/common/bits/kernel_sigaction.h
index 0a35ac8..5c87260 100644
--- a/libc/sysdeps/linux/common/bits/kernel_sigaction.h
+++ b/libc/sysdeps/linux/common/bits/kernel_sigaction.h
@@ -19,18 +19,6 @@ struct old_kernel_sigaction {
unsigned long sa_flags;
void (*sa_restorer)(void);
};
-/* In uclibc, userspace struct sigaction is identical to
- * "new" struct kernel_sigaction (one from the Linux 2.1.68 kernel).
- * See sigaction.h
- */
-
-extern int __syscall_sigaction(int, const struct old_kernel_sigaction *,
- struct old_kernel_sigaction *);
-
#endif
-
-extern int __syscall_rt_sigaction(int, const struct sigaction *,
- struct sigaction *, size_t);
-
#endif /* _BITS_SIGACTION_STRUCT_H */
diff --git a/libc/sysdeps/linux/hppa/bits/kernel_sigaction.h b/libc/sysdeps/linux/hppa/bits/kernel_sigaction.h
index 1c093a5..5834bf3 100644
--- a/libc/sysdeps/linux/hppa/bits/kernel_sigaction.h
+++ b/libc/sysdeps/linux/hppa/bits/kernel_sigaction.h
@@ -12,12 +12,4 @@ struct old_kernel_sigaction {
unsigned long sa_flags;
};
-/* In uclibc, userspace struct sigaction is identical to
- * "new" struct kernel_sigaction (one from the Linux 2.1.68 kernel).
- * See sigaction.h
- */
-
-extern int __syscall_rt_sigaction (int, const struct sigaction *,
- struct sigaction *, size_t) attribute_hidden;
-
#endif
diff --git a/libc/sysdeps/linux/mips/bits/kernel_sigaction.h b/libc/sysdeps/linux/mips/bits/kernel_sigaction.h
index 2048095..65eff7c 100644
--- a/libc/sysdeps/linux/mips/bits/kernel_sigaction.h
+++ b/libc/sysdeps/linux/mips/bits/kernel_sigaction.h
@@ -24,12 +24,4 @@ struct old_kernel_sigaction {
#endif
};
-/* In uclibc, userspace struct sigaction is identical to
- * "new" struct kernel_sigaction (one from the Linux 2.1.68 kernel).
- * See sigaction.h
- */
-
-extern int __syscall_rt_sigaction (int, const struct sigaction *,
- struct sigaction *, size_t) attribute_hidden;
-
#endif
More information about the uClibc-cvs
mailing list