From 931a725809596a3a78fb74afabce4d0ae7be3163 Mon Sep 17 00:00:00 2001 From: Andrew Gallatin Date: Fri, 13 Oct 2000 01:57:43 +0000 Subject: This is the first of 3 commits that will get IBM's JDK 1.3 working with FreeBSD (not including the MINSIGSTKSZ issue, which belongs to Marcel). Due to time constraints, I'm going to space them out over a few days. This fixes two problems with linux_sigaltstack() o ss == 0 is perfectly valid use, so do not fail in this case. o Fix flag handling: - Our SS_DISABLE is 4, linux's is 2, so we need conversion routines. These conversion routines will be needed by linux_rt_sendsig() and linux_rt_sigreturn (forthcoming), so they are not static. - Linux's flag 0 historically meant SS_ONSTACK according to a comment in their linux/kernel/signal.c file. Among other things, this fixes a warning from Sun's JDK 1.3: "Java HotSpot(TM) Client VM warning: cannot uninstall alt signal stack" Reviewed by: marcel Tested by: sto@stat.duke.edu, many others on freebsd-java@ --- sys/i386/linux/linux.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'sys/i386/linux/linux.h') diff --git a/sys/i386/linux/linux.h b/sys/i386/linux/linux.h index 8887ec36f67e..f399f054441f 100644 --- a/sys/i386/linux/linux.h +++ b/sys/i386/linux/linux.h @@ -159,6 +159,14 @@ struct linux_new_utsname { /* sigaltstack */ #define LINUX_MINSIGSTKSZ 2048 +#define LINUX_SS_ONSTACK_BC 0 /* backwards compat SS_ONSTACK */ +#define LINUX_SS_ONSTACK 1 +#define LINUX_SS_DISABLE 2 + + +int linux_to_bsd_sigaltstack(int lsa); +int bsd_to_linux_sigaltstack(int bsa); + typedef void (*linux_handler_t)(int); typedef u_long linux_osigset_t; -- cgit v1.2.3