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

Unified Diff: runtime/vm/os_thread_macos.cc

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_macos.h ('k') | runtime/vm/os_thread_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/os_thread_macos.cc
diff --git a/runtime/vm/os_thread_macos.cc b/runtime/vm/os_thread_macos.cc
index db9dfeb960479095101d58ba0483ad6a781e89c7..2fa58d85456e73334b5501e2b501079ca4070e90 100644
--- a/runtime/vm/os_thread_macos.cc
+++ b/runtime/vm/os_thread_macos.cc
@@ -122,12 +122,11 @@ int OSThread::Start(const char* name,
}
-ThreadLocalKey OSThread::kUnsetThreadLocalKey =
- static_cast<pthread_key_t>(-1);
-ThreadId OSThread::kInvalidThreadId = reinterpret_cast<ThreadId>(NULL);
-ThreadJoinId OSThread::kInvalidThreadJoinId =
+const ThreadId OSThread::kInvalidThreadId = reinterpret_cast<ThreadId>(NULL);
+const ThreadJoinId OSThread::kInvalidThreadJoinId =
reinterpret_cast<ThreadJoinId>(NULL);
+
ThreadLocalKey OSThread::CreateThreadLocal(ThreadDestructor destructor) {
pthread_key_t key = kUnsetThreadLocalKey;
int result = pthread_key_create(&key, destructor);
« no previous file with comments | « runtime/vm/os_thread_macos.h ('k') | runtime/vm/os_thread_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698