| 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 #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> | 8 #include <signal.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| 11 #include <map> | 11 #include <map> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "base/basictypes.h" | 14 #include "base/basictypes.h" |
| 15 #include "sandbox/linux/sandbox_export.h" | 15 #include "sandbox/sandbox_export.h" |
| 16 | 16 |
| 17 namespace sandbox { | 17 namespace sandbox { |
| 18 | 18 |
| 19 class ErrorCode; | 19 class ErrorCode; |
| 20 | 20 |
| 21 // 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 |
| 22 // raising a SIGSYS signal. | 22 // raising a SIGSYS signal. |
| 23 // N.B.: This class does not perform any synchronization operations. If | 23 // N.B.: This class does not perform any synchronization operations. If |
| 24 // 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 |
| 25 // responsibility to ensure that this happens in a thread-safe fashion. | 25 // responsibility to ensure that this happens in a thread-safe fashion. |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 // Our constructor is private. A shared global instance is created | 108 // Our constructor is private. A shared global instance is created |
| 109 // automatically as needed. | 109 // automatically as needed. |
| 110 // Copying and assigning is unimplemented. It doesn't make sense for a | 110 // Copying and assigning is unimplemented. It doesn't make sense for a |
| 111 // singleton. | 111 // singleton. |
| 112 DISALLOW_IMPLICIT_CONSTRUCTORS(Trap); | 112 DISALLOW_IMPLICIT_CONSTRUCTORS(Trap); |
| 113 }; | 113 }; |
| 114 | 114 |
| 115 } // namespace sandbox | 115 } // namespace sandbox |
| 116 | 116 |
| 117 #endif // SANDBOX_LINUX_SECCOMP_BPF_TRAP_H__ | 117 #endif // SANDBOX_LINUX_SECCOMP_BPF_TRAP_H__ |
| OLD | NEW |