Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(139)

Side by Side Diff: runtime/platform/thread_macos.h

Issue 9328042: Move the thread local functions to the Thread class in runtime/platform (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Reverted unintentional change Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_MACOS_H_ 5 #ifndef PLATFORM_THREAD_MACOS_H_
6 #define PLATFORM_THREAD_MACOS_H_ 6 #define PLATFORM_THREAD_MACOS_H_
7 7
8 #if !defined(PLATFORM_THREAD_H_) 8 #if !defined(PLATFORM_THREAD_H_)
9 #error Do not include thread_macos.h directly; use thread.h instead. 9 #error Do not include thread_macos.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/globals.h" 14 #include "platform/globals.h"
15 15
16 namespace dart { 16 namespace dart {
17 17
18 typedef pthread_key_t ThreadLocalKey;
19
18 class MutexData { 20 class MutexData {
19 private: 21 private:
20 MutexData() {} 22 MutexData() {}
21 ~MutexData() {} 23 ~MutexData() {}
22 24
23 pthread_mutex_t* mutex() { return &mutex_; } 25 pthread_mutex_t* mutex() { return &mutex_; }
24 26
25 pthread_mutex_t mutex_; 27 pthread_mutex_t mutex_;
26 28
27 friend class Mutex; 29 friend class Mutex;
(...skipping 16 matching lines...) Expand all
44 46
45 friend class Monitor; 47 friend class Monitor;
46 48
47 DISALLOW_ALLOCATION(); 49 DISALLOW_ALLOCATION();
48 DISALLOW_COPY_AND_ASSIGN(MonitorData); 50 DISALLOW_COPY_AND_ASSIGN(MonitorData);
49 }; 51 };
50 52
51 } // namespace dart 53 } // namespace dart
52 54
53 #endif // PLATFORM_THREAD_MACOS_H_ 55 #endif // PLATFORM_THREAD_MACOS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698