Back to home page

OSCL-LXR

 
 

    


0001 /* 
0002  * Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
0003  * Licensed under the GPL
0004  */
0005 
0006 #ifndef __SYS_SIGCONTEXT_X86_H
0007 #define __SYS_SIGCONTEXT_X86_H
0008 
0009 extern void get_regs_from_mc(struct uml_pt_regs *, mcontext_t *);
0010 
0011 #ifdef __i386__
0012 
0013 #define GET_FAULTINFO_FROM_MC(fi, mc) \
0014     { \
0015         (fi).cr2 = (mc)->cr2; \
0016         (fi).error_code = (mc)->gregs[REG_ERR]; \
0017         (fi).trap_no = (mc)->gregs[REG_TRAPNO]; \
0018     }
0019 
0020 #else
0021 
0022 #define GET_FAULTINFO_FROM_MC(fi, mc) \
0023     { \
0024         (fi).cr2 = (mc)->gregs[REG_CR2]; \
0025         (fi).error_code = (mc)->gregs[REG_ERR]; \
0026         (fi).trap_no = (mc)->gregs[REG_TRAPNO]; \
0027     }
0028 
0029 #endif
0030 
0031 #endif