Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
third_party
dart-lang
sdk
runtime
bin
thread_absl.h
Go to the documentation of this file.
1
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
2
// for details. All rights reserved. Use of this source code is governed by a
3
// BSD-style license that can be found in the LICENSE file.
4
5
#ifndef RUNTIME_BIN_THREAD_ABSL_H_
6
#define RUNTIME_BIN_THREAD_ABSL_H_
7
8
#if !defined(RUNTIME_BIN_THREAD_H_)
9
#error Do not include thread_absl.h directly; use thread.h instead.
10
#endif
11
12
#include <pthread.h>
13
14
#include "
platform/assert.h
"
15
#include "
platform/globals.h
"
16
#include "third_party/absl/synchronization/mutex.h"
17
18
namespace
dart
{
19
namespace
bin {
20
21
typedef
pthread_t
ThreadId
;
22
23
class
MutexData
{
24
private
:
25
MutexData
() : mutex_() {}
26
~MutexData
() {}
27
28
absl::Mutex* mutex() {
return
&mutex_; }
29
30
absl::Mutex mutex_;
31
32
friend
class
Mutex
;
33
34
DISALLOW_ALLOCATION
();
35
DISALLOW_COPY_AND_ASSIGN
(
MutexData
);
36
};
37
38
class
MonitorData
{
39
private
:
40
MonitorData
() : mutex_(), cond_() {}
41
~MonitorData
() {}
42
43
absl::Mutex* mutex() {
return
&mutex_; }
44
absl::CondVar* cond() {
return
&cond_; }
45
46
absl::Mutex mutex_;
47
absl::CondVar cond_;
48
49
friend
class
Monitor
;
50
51
DISALLOW_ALLOCATION
();
52
DISALLOW_COPY_AND_ASSIGN
(
MonitorData
);
53
};
54
55
}
// namespace bin
56
}
// namespace dart
57
58
#endif
// RUNTIME_BIN_THREAD_ABSL_H_
assert.h
dart::bin::MonitorData
Definition
thread_absl.h:38
dart::bin::Monitor
Definition
thread.h:75
dart::bin::MutexData
Definition
thread_absl.h:23
dart::bin::Mutex
Definition
thread.h:60
dart::bin::ThreadId
pthread_t ThreadId
Definition
thread_absl.h:21
dart
Definition
dart_vm.cc:33
globals.h
DISALLOW_ALLOCATION
#define DISALLOW_ALLOCATION()
Definition
globals.h:604
DISALLOW_COPY_AND_ASSIGN
#define DISALLOW_COPY_AND_ASSIGN(TypeName)
Definition
globals.h:581
Generated on Fri Apr 26 2024 06:14:44 for Flutter Engine by
1.9.8