um: finish conversion to mcontext_t
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / arch / um / sys-x86 / shared / sysdep / mcontext.h
blobb724c54da316012bdc7cd6642b74bab0f6b9223a
1 /*
2 * Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
3 * Licensed under the GPL
4 */
6 #ifndef __SYS_SIGCONTEXT_X86_H
7 #define __SYS_SIGCONTEXT_X86_H
9 extern void get_regs_from_mc(struct uml_pt_regs *, mcontext_t *);
11 #ifdef __i386__
13 #define GET_FAULTINFO_FROM_MC(fi, mc) \
14 { \
15 (fi).cr2 = (mc)->cr2; \
16 (fi).error_code = (mc)->gregs[REG_ERR]; \
17 (fi).trap_no = (mc)->gregs[REG_TRAPNO]; \
20 #else
22 #define GET_FAULTINFO_FROM_MC(fi, mc) \
23 { \
24 (fi).cr2 = (mc)->gregs[REG_CR2]; \
25 (fi).error_code = (mc)->gregs[REG_ERR]; \
26 (fi).trap_no = (mc)->gregs[REG_TRAPNO]; \
29 #endif
31 #endif