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

Side by Side Diff: sandbox/linux/seccomp-bpf/trap.h

Issue 12223109: SECCOMP-BPF: Refactor the BPF sandbox API to use fewer "static" fields and methods. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make sure unnamed namespaces are always top-level Created 7 years, 10 months 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 #ifndef SANDBOX_LINUX_SECCOMP_BPF_TRAP_H__ 5 #ifndef SANDBOX_LINUX_SECCOMP_BPF_TRAP_H__
6 #define SANDBOX_LINUX_SECCOMP_BPF_TRAP_H__ 6 #define SANDBOX_LINUX_SECCOMP_BPF_TRAP_H__
7 7
8 #include <signal.h>
9 #include <stdint.h>
10
8 #include <map> 11 #include <map>
9 #include <vector> 12 #include <vector>
10 13
14 #include "sandbox/linux/seccomp-bpf/port.h"
15
16
11 namespace playground2 { 17 namespace playground2 {
12 18
13 class ErrorCode; 19 class ErrorCode;
14 20
15 // The Trap class allows a BPF filter program to branch out to user space by 21 // The Trap class allows a BPF filter program to branch out to user space by
16 // raising a SIGSYS signal. 22 // raising a SIGSYS signal.
17 // N.B.: This class does not perform any synchronization operations. If 23 // N.B.: This class does not perform any synchronization operations. If
18 // modifications are made to any of the traps, it is the caller's 24 // modifications are made to any of the traps, it is the caller's
19 // responsibility to ensure that this happens in a thread-safe fashion. 25 // responsibility to ensure that this happens in a thread-safe fashion.
20 // Preferably, that means that no other threads should be running at that 26 // Preferably, that means that no other threads should be running at that
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 // Our constructor is private. A shared global instance is created 111 // Our constructor is private. A shared global instance is created
106 // automatically as needed. 112 // automatically as needed.
107 // Copying and assigning is unimplemented. It doesn't make sense for a 113 // Copying and assigning is unimplemented. It doesn't make sense for a
108 // singleton. 114 // singleton.
109 DISALLOW_IMPLICIT_CONSTRUCTORS(Trap); 115 DISALLOW_IMPLICIT_CONSTRUCTORS(Trap);
110 }; 116 };
111 117
112 } // namespace playground2 118 } // namespace playground2
113 119
114 #endif // SANDBOX_LINUX_SECCOMP_BPF_TRAP_H__ 120 #endif // SANDBOX_LINUX_SECCOMP_BPF_TRAP_H__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698