Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Side by Side Diff: sandbox/linux/seccomp-bpf/syscall_iterator.cc

Issue 101773003: Linux sandbox: cleanup sandbox-bpf naming. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address namespace sandbox nits. Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "sandbox/linux/seccomp-bpf/syscall_iterator.h" 5 #include "sandbox/linux/seccomp-bpf/syscall_iterator.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "sandbox/linux/seccomp-bpf/linux_seccomp.h" 8 #include "sandbox/linux/seccomp-bpf/linux_seccomp.h"
9 9
10 namespace playground2 { 10 namespace sandbox {
11 11
12 uint32_t SyscallIterator::Next() { 12 uint32_t SyscallIterator::Next() {
13 if (done_) { 13 if (done_) {
14 return num_; 14 return num_;
15 } 15 }
16 16
17 uint32_t val; 17 uint32_t val;
18 do { 18 do {
19 // |num_| has been initialized to 0, which we assume is also MIN_SYSCALL. 19 // |num_| has been initialized to 0, which we assume is also MIN_SYSCALL.
20 // This true for supported architectures (Intel and ARM EABI). 20 // This true for supported architectures (Intel and ARM EABI).
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 82
83 #if defined(__arm__) && (defined(__thumb__) || defined(__ARM_EABI__)) 83 #if defined(__arm__) && (defined(__thumb__) || defined(__ARM_EABI__))
84 bool SyscallIterator::IsArmPrivate(uint32_t num) { 84 bool SyscallIterator::IsArmPrivate(uint32_t num) {
85 return (num >= MIN_PRIVATE_SYSCALL && num <= MAX_PRIVATE_SYSCALL) || 85 return (num >= MIN_PRIVATE_SYSCALL && num <= MAX_PRIVATE_SYSCALL) ||
86 (num >= MIN_GHOST_SYSCALL && num <= MAX_SYSCALL); 86 (num >= MIN_GHOST_SYSCALL && num <= MAX_SYSCALL);
87 } 87 }
88 #else 88 #else
89 bool SyscallIterator::IsArmPrivate(uint32_t) { return false; } 89 bool SyscallIterator::IsArmPrivate(uint32_t) { return false; }
90 #endif 90 #endif
91 91
92 } // namespace 92 } // namespace sandbox
OLDNEW
« no previous file with comments | « sandbox/linux/seccomp-bpf/syscall_iterator.h ('k') | sandbox/linux/seccomp-bpf/syscall_iterator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698