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

Side by Side Diff: sandbox/linux/seccomp-bpf/syscall.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
« no previous file with comments | « sandbox/linux/seccomp-bpf/syscall.h ('k') | sandbox/linux/seccomp-bpf/syscall_iterator.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.h" 5 #include "sandbox/linux/seccomp-bpf/syscall.h"
6 6
7 #include <asm/unistd.h> 7 #include <asm/unistd.h>
8 #include <errno.h> 8 #include <errno.h>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 11
12 namespace playground2 { 12 namespace sandbox {
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
19 // attributes, but "clang" doesn't have this ability. 19 // attributes, but "clang" doesn't have this ability.
20 // The "clang" developer mailing list suggested that the correct 20 // The "clang" developer mailing list suggested that the correct
21 // and portable solution is a file-scope assembly block. 21 // and portable solution is a file-scope assembly block.
22 // N.B. We do mark our code as a proper function so that backtraces 22 // N.B. We do mark our code as a proper function so that backtraces
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 ); 233 );
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 sandbox
OLDNEW
« no previous file with comments | « sandbox/linux/seccomp-bpf/syscall.h ('k') | sandbox/linux/seccomp-bpf/syscall_iterator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698