initial commit with v2.6.9
[linux-2.6.9-moxart.git] / arch / um / include / sysdep-i386 / frame_kern.h
blob18bc5923abe1de74d12a3d7951d1b76837f25d8d
1 /*
2 * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
3 * Licensed under the GPL
4 */
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
11 * on the stack.
14 static inline void *sp_to_sc(unsigned long sp)
16 return((void *) sp);
19 static inline void *sp_to_uc(unsigned long sp)
21 unsigned long uc;
23 uc = sp + signal_frame_si.uc_index -
24 signal_frame_si.common.sp_index - 4;
25 return((void *) uc);
28 static inline void *sp_to_rt_sc(unsigned long sp)
30 unsigned long sc;
32 sc = sp - signal_frame_si.common.sp_index +
33 signal_frame_si.common.len - 4;
34 return((void *) sc);
37 static inline void *sp_to_mask(unsigned long sp)
39 unsigned long mask;
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)
50 unsigned long mask;
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);
58 #endif
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
64 * of the file.
65 * ---------------------------------------------------------------------------
66 * Local variables:
67 * c-file-style: "linux"
68 * End: