2 * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
3 * Licensed under the GPL
6 #ifndef __FRAME_KERN_I386_H
7 #define __FRAME_KERN_I386_H
9 /* This is called from sys_sigreturn. It takes the sp at the point of the
10 * sigreturn system call and returns the address of the sigcontext struct
14 static inline void *sp_to_sc(unsigned long sp)
19 static inline void *sp_to_uc(unsigned long sp)
23 uc = sp + signal_frame_si.uc_index -
24 signal_frame_si.common.sp_index - 4;
28 static inline void *sp_to_rt_sc(unsigned long sp)
32 sc = sp - signal_frame_si.common.sp_index +
33 signal_frame_si.common.len - 4;
37 static inline void *sp_to_mask(unsigned long sp)
41 mask = sp - signal_frame_sc.common.sp_index +
42 signal_frame_sc.common.len - 8;
43 return((void *) mask);
46 extern int sc_size(void *data);
48 static inline void *sp_to_rt_mask(unsigned long sp)
52 mask = sp - signal_frame_si.common.sp_index +
53 signal_frame_si.common.len +
54 sc_size(&signal_frame_si.common.arch) - 4;
55 return((void *) mask);
61 * Overrides for Emacs so that we follow Linus's tabbing style.
62 * Emacs will notice this stuff at the end of the file and automatically
63 * adjust the settings for this buffer only. This must remain at the end
65 * ---------------------------------------------------------------------------
67 * c-file-style: "linux"