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

Unified Diff: runtime/vm/os_thread_linux.h

Issue 1482243006: VM: Small clean up and const-ness fix for Thread/OSThread constants. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years 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/vm/os_thread_android.cc ('k') | runtime/vm/os_thread_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/os_thread_linux.h
diff --git a/runtime/vm/os_thread_linux.h b/runtime/vm/os_thread_linux.h
index 590121461355d97a51f58f022f5c8a6028abd683..306229bd1fde75cee6dc2f25f2ede9a515ff514f 100644
--- a/runtime/vm/os_thread_linux.h
+++ b/runtime/vm/os_thread_linux.h
@@ -20,13 +20,17 @@ typedef pthread_key_t ThreadLocalKey;
typedef pthread_t ThreadId;
typedef pthread_t ThreadJoinId;
+
+static const ThreadLocalKey kUnsetThreadLocalKey =
+ static_cast<pthread_key_t>(-1);
+
+
class ThreadInlineImpl {
private:
ThreadInlineImpl() {}
~ThreadInlineImpl() {}
static uword GetThreadLocal(ThreadLocalKey key) {
- static ThreadLocalKey kUnsetThreadLocalKey = static_cast<pthread_key_t>(-1);
ASSERT(key != kUnsetThreadLocalKey);
return reinterpret_cast<uword>(pthread_getspecific(key));
}
« no previous file with comments | « runtime/vm/os_thread_android.cc ('k') | runtime/vm/os_thread_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698