Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef SANDBOX_LINUX_SERVICES_ANDROID_X86_UCONTEXT_H_ | |
| 6 #define SANDBOX_LINUX_SERVICES_ANDROID_X86_UCONTEXT_H_ | |
| 7 | |
| 8 #include <asm/sigcontext.h> | |
| 9 #include <signal.h> | |
| 10 | |
| 11 #if !defined(__BIONIC_HAVE_UCONTEXT_T) | |
|
jln (very slow on Chromium)
2013/01/08 22:26:09
That's lovely! Do you mind patching it on the arm
| |
| 12 /* Old versions of the Android <signal.h> didn't define ucontext_t. */ | |
| 13 | |
| 14 /* Type for general register. */ | |
| 15 typedef int greg_t; | |
| 16 | |
| 17 /* asm/sigcontext.h has same structure definition based on Linux kernel header. | |
| 18 * But it's not compatible with glibc definition (no gregs). | |
| 19 */ | |
| 20 typedef struct { | |
| 21 greg_t gregs[19]; | |
| 22 void* fpregs; | |
| 23 unsigned long int oldmask; | |
| 24 unsigned long int cr2; | |
| 25 } mcontext_t; | |
| 26 | |
| 27 enum { | |
| 28 REG_GS = 0, REG_FS, REG_ES, REG_DS, | |
| 29 REG_EDI, REG_ESI, REG_EBP, REG_ESP, | |
| 30 REG_EBX, REG_EDX, REG_ECX, REG_EAX, | |
| 31 REG_TRAPNO, REG_ERR, REG_EIP, REG_CS, | |
| 32 REG_EFL, REG_UESP, REG_SS | |
| 33 }; | |
| 34 | |
| 35 /* Machine context at the time a signal was raised. */ | |
| 36 typedef struct ucontext { | |
| 37 unsigned long int uc_flags; | |
| 38 struct ucontext* uc_link; | |
| 39 stack_t uc_stack; | |
| 40 mcontext_t uc_mcontext; | |
| 41 sigset_t uc_sigmask; | |
| 42 } ucontext_t; | |
|
digit1
2013/01/09 09:47:18
that looks good to me too :)
| |
| 43 #endif /* !__BIONIC_HAVE_UCONTEXT_T */ | |
| 44 | |
| 45 #endif // SANDBOX_LINUX_SERVICES_ANDROID_ARM_UCONTEXT_H_ | |
| OLD | NEW |