Index: src/trap-handler/trap-handler-internal.h |
diff --git a/src/trap-handler/trap-handler-internal.h b/src/trap-handler/trap-handler-internal.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..bc649f0af771e58596f9e142cd11a391ccec9e22 |
--- /dev/null |
+++ b/src/trap-handler/trap-handler-internal.h |
@@ -0,0 +1,43 @@ |
+// Copyright 2016 the V8 project authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef TRAP_HANDLER_INTERNAL_H_ |
+#define TRAP_HANDLER_INTERNAL_H_ |
+ |
+// This file should not be included (even transitively) by files outside of |
+// src/trap-handler. |
+ |
+#include "src/trap-handler/trap-handler.h" |
+ |
+#include <atomic> |
+ |
+namespace v8 { |
+namespace internal { |
+namespace trap_handler { |
+ |
+bool MaybeHandleFault(int signum, void* siginfo, void* context); |
+ |
+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?
|
+ void* base; |
+ size_t size; |
+ size_t num_protected_instructions; |
+ // TODO(eholk): this is C++, and flexible array members are |
+ // apparently not allowed. |
+ ProtectedInstructionData instructions[]; |
+}; |
+ |
+class MetadataLock { |
+ static std::atomic_flag spinlock_; |
+ |
+ public: |
+ MetadataLock(); |
+ |
+ ~MetadataLock(); |
+}; |
+ |
+} // namespace trap_handler |
+} // namespace internal |
+} // namespace v8 |
+ |
+#endif // TRAP_HANDLER_INTERNAL_H_ |