OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef SANDBOX_LINUX_SECCOMP_BPF_SYSCALL_H__ | 5 #ifndef SANDBOX_LINUX_SECCOMP_BPF_SYSCALL_H__ |
6 #define SANDBOX_LINUX_SECCOMP_BPF_SYSCALL_H__ | 6 #define SANDBOX_LINUX_SECCOMP_BPF_SYSCALL_H__ |
7 | 7 |
8 #include <signal.h> | 8 #include <signal.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
| 11 // Unlike other header files, this must be include at first, otherwise |
| 12 // OS_ prefixed macros are not properly defined. |
| 13 #include "build/build_config.h" |
| 14 |
11 #include "base/macros.h" | 15 #include "base/macros.h" |
12 #include "sandbox/sandbox_export.h" | 16 #include "sandbox/sandbox_export.h" |
13 | 17 |
14 // Android's signal.h doesn't define ucontext etc. | 18 // Android's signal.h doesn't define ucontext etc. |
15 #if defined(OS_ANDROID) | 19 #if defined(OS_ANDROID) || defined(OS_NACL_NONSFI) |
16 #include "sandbox/linux/system_headers/android_ucontext.h" | 20 #include "sandbox/linux/system_headers/android_ucontext.h" |
17 #endif | 21 #endif |
18 | 22 |
19 namespace sandbox { | 23 namespace sandbox { |
20 | 24 |
21 // This purely static class can be used to perform system calls with some | 25 // This purely static class can be used to perform system calls with some |
22 // low-level control. | 26 // low-level control. |
23 class SANDBOX_EXPORT Syscall { | 27 class SANDBOX_EXPORT Syscall { |
24 public: | 28 public: |
25 // InvalidCall() invokes Call() with a platform-appropriate syscall | 29 // InvalidCall() invokes Call() with a platform-appropriate syscall |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 const intptr_t* args, | 165 const intptr_t* args, |
162 intptr_t* err_stat); | 166 intptr_t* err_stat); |
163 #endif // defined(__mips__) | 167 #endif // defined(__mips__) |
164 | 168 |
165 DISALLOW_IMPLICIT_CONSTRUCTORS(Syscall); | 169 DISALLOW_IMPLICIT_CONSTRUCTORS(Syscall); |
166 }; | 170 }; |
167 | 171 |
168 } // namespace sandbox | 172 } // namespace sandbox |
169 | 173 |
170 #endif // SANDBOX_LINUX_SECCOMP_BPF_SYSCALL_H__ | 174 #endif // SANDBOX_LINUX_SECCOMP_BPF_SYSCALL_H__ |
OLD | NEW |