summaryrefslogtreecommitdiffstats
path: root/sys/alpha/linux/linux.h
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>1999-09-29 15:12:18 +0000
committermarcel <marcel@FreeBSD.org>1999-09-29 15:12:18 +0000
commitbd000d73ad75473ad7201663ffb27c36ab130f0e (patch)
treebc01945dc4b7113b39c954abf475834f0e086487 /sys/alpha/linux/linux.h
parenta16d76cb5680cf0afd1a3be9be9d1f7ea686a96c (diff)
downloadFreeBSD-src-bd000d73ad75473ad7201663ffb27c36ab130f0e.zip
FreeBSD-src-bd000d73ad75473ad7201663ffb27c36ab130f0e.tar.gz
sigset_t change (part 4 of 5)
----------------------------- The compatibility code and/or emulators have been updated: iBCS2 now mostly uses the older syscalls. SVR4 now properly handles all signals. This has been achieved by using the new sigset_t throughout the emulator. The Linuxulator has been severely updated. Internally the new Linux sigset_t is made the default. These are then mapped to and from the new FreeBSD sigset_t. Also, rt_sigsuspend has been implemented in the Linuxulator. Implementing this syscall basicly caused all this sigset_t changing in the first place and the syscall has been used throughout the change as a means for testing. It basicly is too much work to undo the implementation so that it can later be added again. A special note on the use of sv_sigtbl and sv_sigsize in struct sysentvec: Every signal larger than sv_sigsize is not translated and is passed on to the signal handler unmodified. Signals in the range 1 upto and including sv_sigsize are translated. The rationale is that only the system defined signals need to be translated. The emulators also have been updated so that the translation tables are only indexed for valid (system defined) signals. This change also fixes the translation bug already in the SVR4 emulator.
Diffstat (limited to 'sys/alpha/linux/linux.h')
-rw-r--r--sys/alpha/linux/linux.h91
1 files changed, 52 insertions, 39 deletions
diff --git a/sys/alpha/linux/linux.h b/sys/alpha/linux/linux.h
index e55a367..f581314 100644
--- a/sys/alpha/linux/linux.h
+++ b/sys/alpha/linux/linux.h
@@ -47,35 +47,32 @@ typedef struct {
long val[2];
} linux_fsid_t;
typedef int linux_pid_t;
-typedef unsigned long linux_sigset_t;
-typedef void (*linux_handler_t)(int);
-typedef struct {
- void (*lsa_handler)(int);
- linux_sigset_t lsa_mask;
- unsigned long lsa_flags;
- void (*lsa_restorer)(void);
-} linux_sigaction_t;
typedef int linux_key_t;
+/*
+ * Signal stuff...
+ */
+typedef void (*linux_handler_t)(int);
+
+typedef unsigned long linux_osigset_t;
+
typedef struct {
- unsigned long sig[2];
-} linux_new_sigset_t;
+ unsigned int __bits[2];
+} linux_sigset_t;
+
typedef struct {
- void (*lsa_handler)(int);
- unsigned long lsa_flags;
- void (*lsa_restorer)(void);
- linux_new_sigset_t lsa_mask;
-} linux_new_sigaction_t;
+ void (*lsa_handler)(int);
+ linux_osigset_t lsa_mask;
+ unsigned long lsa_flags;
+ void (*lsa_restorer)(void);
+} linux_osigaction_t;
-#define LINUX_MAX_UTSNAME 65
-struct linux_new_utsname {
- char sysname[LINUX_MAX_UTSNAME];
- char nodename[LINUX_MAX_UTSNAME];
- char release[LINUX_MAX_UTSNAME];
- char version[LINUX_MAX_UTSNAME];
- char machine[LINUX_MAX_UTSNAME];
- char domainname[LINUX_MAX_UTSNAME];
-};
+typedef struct {
+ void (*lsa_handler)(int);
+ unsigned long lsa_flags;
+ void (*lsa_restorer)(void);
+ linux_sigset_t lsa_mask;
+} linux_sigaction_t;
/*
* The Linux sigcontext, pretty much a standard 386 trapframe.
@@ -121,20 +118,6 @@ struct linux_sigframe {
extern int bsd_to_linux_signal[];
extern int linux_to_bsd_signal[];
-extern char linux_sigcode[];
-extern int linux_szsigcode;
-extern const char linux_emul_path[];
-
-extern struct sysent linux_sysent[LINUX_SYS_MAXSYSCALL];
-extern struct sysentvec linux_sysvec;
-extern struct sysentvec elf_linux_sysvec;
-
-/* dummy struct definitions */
-struct image_params;
-struct trapframe;
-
-/* misc defines */
-#define LINUX_NAME_MAX 255
/* signal numbers */
#define LINUX_SIGHUP 1
@@ -170,7 +153,8 @@ struct trapframe;
#define LINUX_SIGPOLL LINUX_SIGIO
#define LINUX_SIGPWR 30
#define LINUX_SIGUNUSED 31
-#define LINUX_NSIG 32
+#define LINUX_NSIG 64
+#define LINUX_SIGTBLSZ 31
/* sigaction flags */
#define LINUX_SA_NOCLDSTOP 0x00000001
@@ -188,6 +172,35 @@ struct trapframe;
#define LINUX_SIG_UNBLOCK 1
#define LINUX_SIG_SETMASK 2
+#define LINUX_SIGEMPTYSET(set) (set).__bits[0] = (set).__bits[1] = 0
+#define LINUX_SIGISMEMBER(set, sig) SIGISMEMBER(set, sig)
+#define LINUX_SIGADDSET(set, sig) SIGADDSET(set, sig)
+
+extern char linux_sigcode[];
+extern int linux_szsigcode;
+extern const char linux_emul_path[];
+
+extern struct sysent linux_sysent[LINUX_SYS_MAXSYSCALL];
+extern struct sysentvec linux_sysvec;
+extern struct sysentvec elf_linux_sysvec;
+
+/* dummy struct definitions */
+struct image_params;
+struct trapframe;
+
+#define LINUX_MAX_UTSNAME 65
+struct linux_new_utsname {
+ char sysname[LINUX_MAX_UTSNAME];
+ char nodename[LINUX_MAX_UTSNAME];
+ char release[LINUX_MAX_UTSNAME];
+ char version[LINUX_MAX_UTSNAME];
+ char machine[LINUX_MAX_UTSNAME];
+ char domainname[LINUX_MAX_UTSNAME];
+};
+
+/* misc defines */
+#define LINUX_NAME_MAX 255
+
/* resource limits */
#define LINUX_RLIMIT_CPU 0
#define LINUX_RLIMIT_FSIZE 1
OpenPOWER on IntegriCloud