From 392e8802486cb573b916e746010e141a75f507e6 Mon Sep 17 00:00:00 2001 From: Kevin Date: Sat, 15 Nov 2014 09:58:27 +0800 Subject: init android origin source code --- ANDROID_3.4.5/arch/x86/um/shared/sysdep/mcontext.h | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 ANDROID_3.4.5/arch/x86/um/shared/sysdep/mcontext.h (limited to 'ANDROID_3.4.5/arch/x86/um/shared/sysdep/mcontext.h') diff --git a/ANDROID_3.4.5/arch/x86/um/shared/sysdep/mcontext.h b/ANDROID_3.4.5/arch/x86/um/shared/sysdep/mcontext.h new file mode 100644 index 00000000..b724c54d --- /dev/null +++ b/ANDROID_3.4.5/arch/x86/um/shared/sysdep/mcontext.h @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) + * Licensed under the GPL + */ + +#ifndef __SYS_SIGCONTEXT_X86_H +#define __SYS_SIGCONTEXT_X86_H + +extern void get_regs_from_mc(struct uml_pt_regs *, mcontext_t *); + +#ifdef __i386__ + +#define GET_FAULTINFO_FROM_MC(fi, mc) \ + { \ + (fi).cr2 = (mc)->cr2; \ + (fi).error_code = (mc)->gregs[REG_ERR]; \ + (fi).trap_no = (mc)->gregs[REG_TRAPNO]; \ + } + +#else + +#define GET_FAULTINFO_FROM_MC(fi, mc) \ + { \ + (fi).cr2 = (mc)->gregs[REG_CR2]; \ + (fi).error_code = (mc)->gregs[REG_ERR]; \ + (fi).trap_no = (mc)->gregs[REG_TRAPNO]; \ + } + +#endif + +#endif -- cgit