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

Side by Side Diff: runtime/platform/thread.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
« no previous file with comments | « no previous file | runtime/platform/thread_linux.h » ('j') | runtime/platform/thread_linux.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_H_ 5 #ifndef PLATFORM_THREAD_H_
6 #define PLATFORM_THREAD_H_ 6 #define PLATFORM_THREAD_H_
7 7
8 #include "platform/globals.h" 8 #include "platform/globals.h"
9 9
10 // Declare the OS-specific types ahead of defining the generic classes. 10 // Declare the OS-specific types ahead of defining the generic classes.
(...skipping 10 matching lines...) Expand all
21 namespace dart { 21 namespace dart {
22 22
23 class Thread { 23 class Thread {
24 public: 24 public:
25 typedef void (*ThreadStartFunction) (uword parameter); 25 typedef void (*ThreadStartFunction) (uword parameter);
26 26
27 // Start a thread running the specified function. Returns 0 if the 27 // Start a thread running the specified function. Returns 0 if the
28 // thread started successfuly and a system specific error code if 28 // thread started successfuly and a system specific error code if
29 // the thread failed to start. 29 // the thread failed to start.
30 static int Start(ThreadStartFunction function, uword parameters); 30 static int Start(ThreadStartFunction function, uword parameters);
31
32 static ThreadLocalKey kInvalidThreadLocal;
siva 2012/02/06 19:29:37 data field is clubbed in with functions, shouldn't
Søren Gjesse 2012/02/07 09:13:59 Moved field and changed name to kUnsetThreadlocalK
33 static ThreadLocalKey CreateThreadLocal();
34 static void DeleteThreadLocal(ThreadLocalKey key);
35 static uword GetThreadLocal(ThreadLocalKey key);
36 static void SetThreadLocal(ThreadLocalKey key, uword value);
31 }; 37 };
32 38
33 39
34 class Mutex { 40 class Mutex {
35 public: 41 public:
36 Mutex(); 42 Mutex();
37 ~Mutex(); 43 ~Mutex();
38 44
39 void Lock(); 45 void Lock();
40 bool TryLock(); 46 bool TryLock();
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 private: 78 private:
73 MonitorData data_; // OS-specific data. 79 MonitorData data_; // OS-specific data.
74 80
75 DISALLOW_COPY_AND_ASSIGN(Monitor); 81 DISALLOW_COPY_AND_ASSIGN(Monitor);
76 }; 82 };
77 83
78 } // namespace dart 84 } // namespace dart
79 85
80 86
81 #endif // PLATFORM_THREAD_H_ 87 #endif // PLATFORM_THREAD_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/platform/thread_linux.h » ('j') | runtime/platform/thread_linux.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698