LLDB
mainline
llvm-project
lldb
include
lldb
API
SBMutex.h
Go to the documentation of this file.
1
//===-- SBMutex.h ---------------------------------------------------------===//
2
//
3
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
// See https://llvm.org/LICENSE.txt for license information.
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
//
7
//===----------------------------------------------------------------------===//
8
9
#ifndef LLDB_API_SBMUTEX_H
10
#define LLDB_API_SBMUTEX_H
11
12
#include "
lldb/API/SBDefines.h
"
13
#include "
lldb/lldb-forward.h
"
14
#include <mutex>
15
16
namespace
lldb
{
17
18
class
LLDB_API
SBMutex
{
19
public
:
20
SBMutex
();
21
SBMutex
(
const
SBMutex
&rhs);
22
const
SBMutex
&operator=(
const
SBMutex
&rhs);
23
~SBMutex
();
24
25
/// Returns true if this lock has ownership of the underlying mutex.
26
bool
IsValid()
const
;
27
28
/// Blocking operation that takes ownership of this lock.
29
void
lock()
const
;
30
31
/// Releases ownership of this lock.
32
void
unlock()
const
;
33
34
private
:
35
// Private constructor used by SBTarget to create the Target API mutex.
36
// Requires a friend declaration.
37
SBMutex
(
lldb::TargetSP
target_sp);
38
friend
class
SBTarget
;
39
40
std::shared_ptr<std::recursive_mutex>
m_opaque_sp
;
41
};
42
43
}
// namespace lldb
44
45
#endif
SBDefines.h
LLDB_API
#define LLDB_API
Definition:
SBDefines.h:28
lldb::SBMutex
Definition:
SBMutex.h:18
lldb::SBMutex::m_opaque_sp
std::shared_ptr< std::recursive_mutex > m_opaque_sp
Definition:
SBMutex.h:40
lldb::SBTarget
Definition:
SBTarget.h:37
lldb-forward.h
lldb
Definition:
SBAddress.h:15
lldb::TargetSP
std::shared_ptr< lldb_private::Target > TargetSP
Definition:
lldb-forward.h:456
Generated on Wed Sep 3 2025 19:36:57 for LLDB by
1.9.6