v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
object-lock-inl.h
Go to the documentation of this file.
1
// Copyright 2024 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 V8_HEAP_OBJECT_LOCK_INL_H_
6
#define V8_HEAP_OBJECT_LOCK_INL_H_
7
8
#include "
src/heap/object-lock.h
"
9
// Include the non-inl header before the rest of the headers.
10
11
#include "
src/heap/mutable-page-metadata-inl.h
"
12
13
namespace
v8
{
14
namespace
internal
{
15
16
// static
17
void
ObjectLock::Lock
(
Tagged<HeapObject>
heap_object) {
18
MutablePageMetadata::FromHeapObject
(heap_object)->
object_mutex
().
Lock
();
19
}
20
21
// static
22
void
ObjectLock::Unlock
(
Tagged<HeapObject>
heap_object) {
23
MutablePageMetadata::FromHeapObject
(heap_object)->
object_mutex
().
Unlock
();
24
}
25
26
ObjectLockGuard::ObjectLockGuard
(
Tagged<HeapObject>
object
)
27
: raw_object_(object) {
28
ObjectLock::Lock
(
object
);
29
}
30
31
ObjectLockGuard::~ObjectLockGuard
() {
ObjectLock::Unlock
(
raw_object_
); }
32
33
}
// namespace internal
34
}
// namespace v8
35
36
#endif
// V8_HEAP_OBJECT_LOCK_INL_H_
v8::base::Mutex::Unlock
void Unlock()
Definition
mutex.cc:67
v8::base::Mutex::Lock
void Lock()
Definition
mutex.cc:62
v8::internal::MutablePageMetadata::object_mutex
base::Mutex & object_mutex()
Definition
mutable-page-metadata.h:104
v8::internal::MutablePageMetadata::FromHeapObject
static V8_INLINE MutablePageMetadata * FromHeapObject(Tagged< HeapObject > o)
Definition
mutable-page-metadata-inl.h:23
v8::internal::ObjectLockGuard::~ObjectLockGuard
V8_INLINE ~ObjectLockGuard()
Definition
object-lock-inl.h:31
v8::internal::ObjectLockGuard::ObjectLockGuard
V8_INLINE ObjectLockGuard(Tagged< HeapObject > object)
Definition
object-lock-inl.h:26
v8::internal::ObjectLockGuard::raw_object_
Tagged< HeapObject > raw_object_
Definition
object-lock.h:25
v8::internal::ObjectLock::Lock
static V8_INLINE void Lock(Tagged< HeapObject > heap_object)
Definition
object-lock-inl.h:17
v8::internal::ObjectLock::Unlock
static V8_INLINE void Unlock(Tagged< HeapObject > heap_object)
Definition
object-lock-inl.h:22
v8::internal::Tagged
Definition
waiter-queue-node.h:21
mutable-page-metadata-inl.h
v8::internal::internal
internal
Definition
wasm-objects-inl.h:458
v8
Definition
api-arguments-inl.h:19
object-lock.h
src
heap
object-lock-inl.h
Generated on Sun Apr 6 2025 21:08:54 for v8 by
1.12.0