| 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 #include <asm/unistd.h> | 5 #include <asm/unistd.h> |
| 6 #include <errno.h> | 6 #include <errno.h> |
| 7 | 7 |
| 8 #include "sandbox/linux/seccomp-bpf/sandbox_bpf.h" | 8 #include "sandbox/linux/seccomp-bpf/port.h" |
| 9 #include "sandbox/linux/seccomp-bpf/syscall.h" | 9 #include "sandbox/linux/seccomp-bpf/syscall.h" |
| 10 | 10 |
| 11 | 11 |
| 12 namespace playground2 { | 12 namespace playground2 { |
| 13 | 13 |
| 14 asm( // We need to be able to tell the kernel exactly where we made a | 14 asm( // We need to be able to tell the kernel exactly where we made a |
| 15 // system call. The C++ compiler likes to sometimes clone or | 15 // system call. The C++ compiler likes to sometimes clone or |
| 16 // inline code, which would inadvertently end up duplicating | 16 // inline code, which would inadvertently end up duplicating |
| 17 // the entry point. | 17 // the entry point. |
| 18 // "gcc" can suppress code duplication with suitable function | 18 // "gcc" can suppress code duplication with suitable function |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 ret = inout; | 234 ret = inout; |
| 235 } | 235 } |
| 236 #else | 236 #else |
| 237 errno = ENOSYS; | 237 errno = ENOSYS; |
| 238 intptr_t ret = -1; | 238 intptr_t ret = -1; |
| 239 #endif | 239 #endif |
| 240 return ret; | 240 return ret; |
| 241 } | 241 } |
| 242 | 242 |
| 243 } // namespace | 243 } // namespace |
| OLD | NEW |