OLD | NEW |
| (Empty) |
1 // Copyright (c) 2011, 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 VM_THREAD_WIN_H_ | |
6 #define VM_THREAD_WIN_H_ | |
7 | |
8 #include "vm/globals.h" | |
9 | |
10 namespace dart { | |
11 | |
12 class ThreadData { | |
13 private: | |
14 ThreadData() {} | |
15 ~ThreadData() {} | |
16 | |
17 uintptr_t thread_handle_; | |
18 uint32_t tid_; | |
19 | |
20 friend class Thread; | |
21 | |
22 DISALLOW_ALLOCATION(); | |
23 DISALLOW_COPY_AND_ASSIGN(ThreadData); | |
24 }; | |
25 | |
26 | |
27 class MutexData { | |
28 private: | |
29 MutexData() {} | |
30 ~MutexData() {} | |
31 | |
32 HANDLE semaphore_; | |
33 | |
34 friend class Mutex; | |
35 | |
36 DISALLOW_ALLOCATION(); | |
37 DISALLOW_COPY_AND_ASSIGN(MutexData); | |
38 }; | |
39 | |
40 | |
41 class MonitorData { | |
42 private: | |
43 MonitorData() {} | |
44 ~MonitorData() {} | |
45 | |
46 CRITICAL_SECTION cs_; | |
47 // TODO(ager): Condition variables only available since Windows | |
48 // Vista. Therefore, this is only a temporary solution. We will have | |
49 // to implement simple condition variables for use in Windows XP and | |
50 // earlier. | |
51 CONDITION_VARIABLE cond_; | |
52 | |
53 friend class Monitor; | |
54 | |
55 DISALLOW_ALLOCATION(); | |
56 DISALLOW_COPY_AND_ASSIGN(MonitorData); | |
57 }; | |
58 | |
59 } // namespace dart | |
60 | |
61 #endif // VM_THREAD_WIN_H_ | |
OLD | NEW |