blob: 6718ed04b05bf63c832fa4592c4c3c3de3b3bcd5 [file] [log] [blame]
Harvey Harrison123a6342008-02-08 12:10:00 -08001#ifdef CONFIG_X86_32
Hiroshi Shimamotoa5c56eb2008-12-17 18:49:55 -08002#define sigframe_ia32 sigframe
3#define rt_sigframe_ia32 rt_sigframe
4#define sigcontext_ia32 sigcontext
5#define _fpstate_ia32 _fpstate
6#define ucontext_ia32 ucontext
7
8struct sigframe_ia32 {
9 u32 pretcode;
Linus Torvalds1da177e2005-04-16 15:20:36 -070010 int sig;
Hiroshi Shimamotoa5c56eb2008-12-17 18:49:55 -080011 struct sigcontext_ia32 sc;
Suresh Siddha3c1c7f12008-07-29 10:29:21 -070012 /*
13 * fpstate is unused. fpstate is moved/allocated after
14 * retcode[] below. This movement allows to have the FP state and the
15 * future state extensions (xsave) stay together.
16 * And at the same time retaining the unused fpstate, prevents changing
17 * the offset of extramask[] in the sigframe and thus prevent any
18 * legacy application accessing/modifying it.
19 */
Hiroshi Shimamotoa5c56eb2008-12-17 18:49:55 -080020 struct _fpstate_ia32 fpstate_unused;
Linus Torvalds1da177e2005-04-16 15:20:36 -070021 unsigned long extramask[_NSIG_WORDS-1];
22 char retcode[8];
Suresh Siddha3c1c7f12008-07-29 10:29:21 -070023 /* fp state follows here */
Linus Torvalds1da177e2005-04-16 15:20:36 -070024};
25
Hiroshi Shimamotoa5c56eb2008-12-17 18:49:55 -080026struct rt_sigframe_ia32 {
27 u32 pretcode;
Linus Torvalds1da177e2005-04-16 15:20:36 -070028 int sig;
Hiroshi Shimamotoa5c56eb2008-12-17 18:49:55 -080029 u32 pinfo;
30 u32 puc;
Linus Torvalds1da177e2005-04-16 15:20:36 -070031 struct siginfo info;
Hiroshi Shimamotoa5c56eb2008-12-17 18:49:55 -080032 struct ucontext_ia32 uc;
Linus Torvalds1da177e2005-04-16 15:20:36 -070033 char retcode[8];
Suresh Siddha3c1c7f12008-07-29 10:29:21 -070034 /* fp state follows here */
Linus Torvalds1da177e2005-04-16 15:20:36 -070035};
Hiroshi Shimamotoa5c56eb2008-12-17 18:49:55 -080036#else /* !CONFIG_X86_32 */
Harvey Harrison123a6342008-02-08 12:10:00 -080037struct rt_sigframe {
38 char __user *pretcode;
39 struct ucontext uc;
40 struct siginfo info;
Suresh Siddha3c1c7f12008-07-29 10:29:21 -070041 /* fp state follows here */
Harvey Harrison123a6342008-02-08 12:10:00 -080042};
Hiroshi Shimamotoa5c56eb2008-12-17 18:49:55 -080043#endif /* CONFIG_X86_32 */