Flutter Engine
The Flutter Engine
third_party
dart-lang
sdk
runtime
bin
thread_macos.h
Go to the documentation of this file.
1
// Copyright (c) 2012, 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_MACOS_H_
6
#define RUNTIME_BIN_THREAD_MACOS_H_
7
8
#if !defined(RUNTIME_BIN_THREAD_H_)
9
#error Do not include thread_macos.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
17
namespace
dart
{
18
namespace
bin {
19
20
typedef
pthread_t
ThreadId
;
21
22
class
MutexData {
23
private
:
24
MutexData() {}
25
~MutexData() {}
26
27
pthread_mutex_t* mutex() {
return
&mutex_; }
28
29
pthread_mutex_t mutex_;
30
31
friend
class
Mutex
;
32
33
DISALLOW_ALLOCATION
();
34
DISALLOW_COPY_AND_ASSIGN
(MutexData);
35
};
36
37
class
MonitorData {
38
private
:
39
MonitorData() {}
40
~MonitorData() {}
41
42
pthread_mutex_t* mutex() {
return
&mutex_; }
43
pthread_cond_t* cond() {
return
&cond_; }
44
45
pthread_mutex_t mutex_;
46
pthread_cond_t cond_;
47
48
friend
class
Monitor
;
49
50
DISALLOW_ALLOCATION
();
51
DISALLOW_COPY_AND_ASSIGN
(MonitorData);
52
};
53
54
}
// namespace bin
55
}
// namespace dart
56
57
#endif
// RUNTIME_BIN_THREAD_MACOS_H_
assert.h
dart::bin::MonitorData::Monitor
friend class Monitor
Definition:
thread_absl.h:49
dart::bin::MutexData::Mutex
friend class Mutex
Definition:
thread_absl.h:32
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 Sun Jun 23 2024 21:55:24 for Flutter Engine by
1.9.4