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

Unified Diff: runtime/platform/thread_win.h

Issue 25909002: Sampling profiler (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/platform/thread_macos.cc ('k') | runtime/platform/thread_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/platform/thread_win.h
diff --git a/runtime/platform/thread_win.h b/runtime/platform/thread_win.h
index b67b25431950514c82671de9bc6c860fd412afcc..40e5a116f4687e29dd00c286b9da691edf35e462 100644
--- a/runtime/platform/thread_win.h
+++ b/runtime/platform/thread_win.h
@@ -15,12 +15,17 @@
namespace dart {
typedef DWORD ThreadLocalKey;
+typedef HANDLE ThreadId;
+
class ThreadInlineImpl {
private:
ThreadInlineImpl() {}
~ThreadInlineImpl() {}
+ static ThreadLocalKey thread_id_key;
+ static ThreadId CreateThreadId();
+ static void DestroyThreadId(ThreadId);
static uword GetThreadLocal(ThreadLocalKey key) {
static ThreadLocalKey kUnsetThreadLocalKey = TLS_OUT_OF_INDEXES;
ASSERT(key != kUnsetThreadLocalKey);
@@ -28,6 +33,8 @@ class ThreadInlineImpl {
}
friend class Thread;
+ friend class OS;
+ friend unsigned int __stdcall ThreadEntry(void* data_ptr);
DISALLOW_ALLOCATION();
DISALLOW_COPY_AND_ASSIGN(ThreadInlineImpl);
@@ -70,6 +77,8 @@ class MonitorWaitData {
friend class Monitor;
friend class MonitorData;
+ friend class OS;
+
DISALLOW_COPY_AND_ASSIGN(MonitorWaitData);
};
@@ -86,7 +95,7 @@ class MonitorData {
void RemoveWaiter(MonitorWaitData* wait_data);
void SignalAndRemoveFirstWaiter();
void SignalAndRemoveAllWaiters();
- MonitorWaitData* GetMonitorWaitDataForThread();
+ static MonitorWaitData* GetMonitorWaitDataForThread();
// The external critical section for the monitor.
CRITICAL_SECTION cs_;
@@ -104,6 +113,8 @@ class MonitorData {
MonitorWaitData* waiters_tail_;
friend class Monitor;
+ friend class OS;
+ friend unsigned int __stdcall ThreadEntry(void* data_ptr);
DISALLOW_ALLOCATION();
DISALLOW_COPY_AND_ASSIGN(MonitorData);
« no previous file with comments | « runtime/platform/thread_macos.cc ('k') | runtime/platform/thread_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698