diff options
author | hidehiko <hidehiko@chromium.org> | 2015-04-13 20:41:11 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-04-14 03:42:36 +0000 |
commit | 3b996212fa3c92af3233246ae54af728eb7c3591 (patch) | |
tree | 3c6922bbb0741a20703873886f34782fd8727bd4 | |
parent | eb49ae532e7b2595cfaec8a668f3705ab52733a7 (diff) | |
download | chromium_src-3b996212fa3c92af3233246ae54af728eb7c3591.zip chromium_src-3b996212fa3c92af3233246ae54af728eb7c3591.tar.gz chromium_src-3b996212fa3c92af3233246ae54af728eb7c3591.tar.bz2 |
Small refactor around futex.h.
This is the preparation of seccomp-bpf implementation
for nacl_helper_nonsfi.
PNaCl toolchain does not provides linux/futex.h.
This CL is the preparation to reuse android_futex.h
for PNaCl toolchain, too.
TEST=Ran bots.
BUG=358465
Review URL: https://codereview.chromium.org/1076213002
Cr-Commit-Position: refs/heads/master@{#324996}
-rw-r--r-- | sandbox/linux/BUILD.gn | 2 | ||||
-rw-r--r-- | sandbox/linux/sandbox_linux.gypi | 2 | ||||
-rw-r--r-- | sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc | 3 | ||||
-rw-r--r-- | sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc | 4 | ||||
-rw-r--r-- | sandbox/linux/system_headers/linux_futex.h (renamed from sandbox/linux/system_headers/android_futex.h) | 8 |
5 files changed, 9 insertions, 10 deletions
diff --git a/sandbox/linux/BUILD.gn b/sandbox/linux/BUILD.gn index 1794199..21f856b 100644 --- a/sandbox/linux/BUILD.gn +++ b/sandbox/linux/BUILD.gn @@ -290,11 +290,11 @@ source_set("sandbox_services_headers") { sources = [ "system_headers/android_arm64_ucontext.h", "system_headers/android_arm_ucontext.h", - "system_headers/android_futex.h", "system_headers/android_i386_ucontext.h", "system_headers/android_ucontext.h", "system_headers/arm64_linux_syscalls.h", "system_headers/arm_linux_syscalls.h", + "system_headers/linux_futex.h", "system_headers/linux_seccomp.h", "system_headers/linux_syscalls.h", "system_headers/x86_32_linux_syscalls.h", diff --git a/sandbox/linux/sandbox_linux.gypi b/sandbox/linux/sandbox_linux.gypi index 4305b41..1cf3b2d 100644 --- a/sandbox/linux/sandbox_linux.gypi +++ b/sandbox/linux/sandbox_linux.gypi @@ -280,13 +280,13 @@ 'sources': [ 'system_headers/android_arm64_ucontext.h', 'system_headers/android_arm_ucontext.h', - 'system_headers/android_futex.h', 'system_headers/android_i386_ucontext.h', 'system_headers/android_mips_ucontext.h', 'system_headers/android_ucontext.h', 'system_headers/arm64_linux_syscalls.h', 'system_headers/arm_linux_syscalls.h', 'system_headers/capability.h', + 'system_headers/linux_futex.h', 'system_headers/linux_seccomp.h', 'system_headers/linux_syscalls.h', 'system_headers/mips_linux_syscalls.h', diff --git a/sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc b/sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc index e6e8934..614849f 100644 --- a/sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc +++ b/sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc @@ -6,7 +6,6 @@ #include <errno.h> #include <fcntl.h> -#include <linux/futex.h> #include <sched.h> #include <signal.h> #include <string.h> @@ -32,7 +31,7 @@ #include "sandbox/linux/seccomp-bpf/syscall.h" #include "sandbox/linux/services/syscall_wrappers.h" #include "sandbox/linux/services/thread_helpers.h" -#include "sandbox/linux/system_headers/android_futex.h" +#include "sandbox/linux/system_headers/linux_futex.h" #include "sandbox/linux/system_headers/linux_syscalls.h" #include "sandbox/linux/tests/test_utils.h" #include "sandbox/linux/tests/unit_tests.h" diff --git a/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc b/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc index b315f12a..282e727 100644 --- a/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc +++ b/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc @@ -7,7 +7,6 @@ #include <errno.h> #include <fcntl.h> #include <fcntl.h> -#include <linux/futex.h> #include <linux/net.h> #include <sched.h> #include <signal.h> @@ -30,12 +29,11 @@ #include "sandbox/linux/bpf_dsl/seccomp_macros.h" #include "sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h" #include "sandbox/linux/seccomp-bpf/sandbox_bpf.h" +#include "sandbox/linux/system_headers/linux_futex.h" #include "sandbox/linux/system_headers/linux_syscalls.h" #if defined(OS_ANDROID) -#include "sandbox/linux/system_headers/android_futex.h" - #if !defined(F_DUPFD_CLOEXEC) #define F_DUPFD_CLOEXEC (F_LINUX_SPECIFIC_BASE + 6) #endif diff --git a/sandbox/linux/system_headers/android_futex.h b/sandbox/linux/system_headers/linux_futex.h index 11b766f..91733a8 100644 --- a/sandbox/linux/system_headers/android_futex.h +++ b/sandbox/linux/system_headers/linux_futex.h @@ -2,8 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef SANDBOX_LINUX_SYSTEM_HEADERS_ANDROID_FUTEX_H_ -#define SANDBOX_LINUX_SYSTEM_HEADERS_ANDROID_FUTEX_H_ +#ifndef SANDBOX_LINUX_SYSTEM_HEADERS_LINUX_FUTEX_H_ +#define SANDBOX_LINUX_SYSTEM_HEADERS_LINUX_FUTEX_H_ + +#include <linux/futex.h> #if !defined(FUTEX_WAIT) #define FUTEX_WAIT 0 @@ -77,4 +79,4 @@ #define FUTEX_UNLOCK_PI_PRIVATE (FUTEX_UNLOCK_PI | FUTEX_PRIVATE_FLAG) #endif -#endif // SANDBOX_LINUX_SYSTEM_HEADERS_ANDROID_FUTEX_H_ +#endif // SANDBOX_LINUX_SYSTEM_HEADERS_LINUX_FUTEX_H_ |