OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2016 the V8 project authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef TRAP_HANDLER_INTERNAL_H_ | |
6 #define TRAP_HANDLER_INTERNAL_H_ | |
7 | |
8 // This file should not be included (even transitively) by files outside of | |
9 // src/trap-handler. | |
10 | |
11 #include "src/trap-handler/trap-handler.h" | |
12 | |
13 #include <atomic> | |
14 | |
15 namespace v8 { | |
16 namespace internal { | |
17 namespace trap_handler { | |
18 | |
19 bool MaybeHandleFault(int signum, void* siginfo, void* context); | |
20 | |
21 struct CodeObjectData { | |
titzer
2017/01/09 09:26:56
Can we make this name a little more descriptive?
Eric Holk
2017/01/10 23:10:48
How's CodeProtectionInfo?
| |
22 void* base; | |
23 size_t size; | |
24 size_t num_protected_instructions; | |
25 // TODO(eholk): this is C++, and flexible array members are | |
26 // apparently not allowed. | |
27 ProtectedInstructionData instructions[]; | |
28 }; | |
29 | |
30 class MetadataLock { | |
31 static std::atomic_flag spinlock_; | |
32 | |
33 public: | |
34 MetadataLock(); | |
35 | |
36 ~MetadataLock(); | |
37 }; | |
38 | |
39 } // namespace trap_handler | |
40 } // namespace internal | |
41 } // namespace v8 | |
42 | |
43 #endif // TRAP_HANDLER_INTERNAL_H_ | |
OLD | NEW |