OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The Native Client Authors. All rights reserved. | 2 * Copyright (c) 2013 The Native Client Authors. All rights reserved. |
3 * Use of this source code is governed by a BSD-style license that can be | 3 * Use of this source code is governed by a BSD-style license that can be |
4 * found in the LICENSE file. | 4 * found in the LICENSE file. |
5 */ | 5 */ |
6 | 6 |
7 #include <setjmp.h> | 7 #include <setjmp.h> |
8 #include <signal.h> | 8 #include <signal.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 #include <stdlib.h> | 10 #include <stdlib.h> |
11 | 11 |
| 12 #include "native_client/src/include/build_config.h" |
12 #include "native_client/src/include/nacl_macros.h" | 13 #include "native_client/src/include/nacl_macros.h" |
13 #include "native_client/src/include/arm_sandbox.h" | 14 #include "native_client/src/include/arm_sandbox.h" |
14 #include "native_client/src/trusted/platform_qualify/arch/arm/nacl_arm_qualify.h
" | 15 #include "native_client/src/trusted/platform_qualify/arch/arm/nacl_arm_qualify.h
" |
15 | 16 |
16 static sigjmp_buf try_state; | 17 static sigjmp_buf try_state; |
17 | 18 |
18 static void signal_catch(int sig) { | 19 static void signal_catch(int sig) { |
19 siglongjmp(try_state, sig); | 20 siglongjmp(try_state, sig); |
20 } | 21 } |
21 | 22 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 } | 66 } |
66 | 67 |
67 #if NACL_ANDROID | 68 #if NACL_ANDROID |
68 (void) sigaction(SIGBUS, &old_sigaction_bus, NULL); | 69 (void) sigaction(SIGBUS, &old_sigaction_bus, NULL); |
69 #endif | 70 #endif |
70 (void) sigaction(SIGILL, &old_sigaction_ill, NULL); | 71 (void) sigaction(SIGILL, &old_sigaction_ill, NULL); |
71 (void) sigaction(SIGTRAP, &old_sigaction_trap, NULL); | 72 (void) sigaction(SIGTRAP, &old_sigaction_trap, NULL); |
72 | 73 |
73 return !fell_through; | 74 return !fell_through; |
74 } | 75 } |
OLD | NEW |