| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS 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 | 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. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef PLATFORM_THREAD_LINUX_H_ | 5 #ifndef PLATFORM_THREAD_LINUX_H_ |
| 6 #define PLATFORM_THREAD_LINUX_H_ | 6 #define PLATFORM_THREAD_LINUX_H_ |
| 7 | 7 |
| 8 #if !defined(PLATFORM_THREAD_H_) | 8 #if !defined(PLATFORM_THREAD_H_) |
| 9 #error Do not include thread_linux.h directly; use thread.h instead. | 9 #error Do not include thread_linux.h directly; use thread.h instead. |
| 10 #endif | 10 #endif |
| 11 | 11 |
| 12 #include <pthread.h> | 12 #include <pthread.h> |
| 13 | 13 |
| 14 #include "platform/assert.h" | 14 #include "platform/assert.h" |
| 15 #include "platform/globals.h" | 15 #include "platform/globals.h" |
| 16 | 16 |
| 17 namespace dart { | 17 namespace dart { |
| 18 | 18 |
| 19 typedef pthread_key_t ThreadLocalKey; |
| 20 |
| 19 class MutexData { | 21 class MutexData { |
| 20 private: | 22 private: |
| 21 MutexData() {} | 23 MutexData() {} |
| 22 ~MutexData() {} | 24 ~MutexData() {} |
| 23 | 25 |
| 24 pthread_mutex_t* mutex() { return &mutex_; } | 26 pthread_mutex_t* mutex() { return &mutex_; } |
| 25 | 27 |
| 26 pthread_mutex_t mutex_; | 28 pthread_mutex_t mutex_; |
| 27 | 29 |
| 28 friend class Mutex; | 30 friend class Mutex; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 45 | 47 |
| 46 friend class Monitor; | 48 friend class Monitor; |
| 47 | 49 |
| 48 DISALLOW_ALLOCATION(); | 50 DISALLOW_ALLOCATION(); |
| 49 DISALLOW_COPY_AND_ASSIGN(MonitorData); | 51 DISALLOW_COPY_AND_ASSIGN(MonitorData); |
| 50 }; | 52 }; |
| 51 | 53 |
| 52 } // namespace dart | 54 } // namespace dart |
| 53 | 55 |
| 54 #endif // PLATFORM_THREAD_LINUX_H_ | 56 #endif // PLATFORM_THREAD_LINUX_H_ |
| OLD | NEW |