diff options
author | Ian Lance Taylor <iant@golang.org> | 2009-10-26 22:49:08 -0700 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2009-10-26 22:49:08 -0700 |
commit | 94ad282e94e38e9394b031edbc30605f9331d033 (patch) | |
tree | dbf2f4416a4686386b35a7e557b730d0f8db94de /src/pkg/runtime/linux/defs2.c | |
parent | a0857e4a2dc0f11b2a6a0f859f885ac7091e6c09 (diff) | |
download | golang-94ad282e94e38e9394b031edbc30605f9331d033.tar.gz |
Get the right sigaction struct for the 386 rt_sigaction system
call. This uses the header files from a 32-bit Ubuntu Hardy
system.
The use of _LOOSE_KERNEL_NAMES seems right. The
-D__ARCH_SI_UID_T works around a bug which appears to be fixed
in later Linux versions.
R=rsc
http://go/go-review/1013015
Diffstat (limited to 'src/pkg/runtime/linux/defs2.c')
-rw-r--r-- | src/pkg/runtime/linux/defs2.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/pkg/runtime/linux/defs2.c b/src/pkg/runtime/linux/defs2.c index aa0331a37..a91086aa5 100644 --- a/src/pkg/runtime/linux/defs2.c +++ b/src/pkg/runtime/linux/defs2.c @@ -13,8 +13,9 @@ #include <asm/signal.h> #include <asm/mman.h> -#include <asm/sigframe.h> +#include <asm/sigcontext.h> #include <asm/ucontext.h> +#include <asm/siginfo.h> /* #include <sys/signal.h> @@ -22,6 +23,17 @@ #include <ucontext.h> */ +/* This is the sigaction structure from the Linux 2.1.68 kernel which + is used with the rt_sigaction system call. For 386 this is not + defined in any public header file. */ + +struct kernel_sigaction { + __sighandler_t k_sa_handler; + unsigned long sa_flags; + void (*sa_restorer) (void); + sigset_t sa_mask; +}; + enum { $PROT_NONE = PROT_NONE, $PROT_READ = PROT_READ, @@ -43,7 +55,7 @@ typedef struct _xmmreg $Xmmreg; typedef struct _fpstate $Fpstate; typedef struct timespec $Timespec; typedef struct timeval $Timeval; -typedef struct sigaction $Sigaction; +typedef struct kernel_sigaction $Sigaction; typedef siginfo_t $Siginfo; typedef struct sigaltstack $Sigaltstack; typedef struct sigcontext $Sigcontext; |