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

Unified Diff: runtime/vm/os_thread_android.cc

Issue 1275353005: VM thread shutdown. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: runtime/vm/os_thread_android.cc
diff --git a/runtime/vm/os_thread_android.cc b/runtime/vm/os_thread_android.cc
index ae1b9f2d4e81c755dfbd079b9f3c061eb03b6620..170559c07b247641f7b7fbd7ee43cfbd5324bbdf 100644
--- a/runtime/vm/os_thread_android.cc
+++ b/runtime/vm/os_thread_android.cc
@@ -101,9 +101,6 @@ int OSThread::Start(ThreadStartFunction function, uword parameter) {
int result = pthread_attr_init(&attr);
RETURN_ON_PTHREAD_FAILURE(result);
- result = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
- RETURN_ON_PTHREAD_FAILURE(result);
-
result = pthread_attr_setstacksize(&attr, OSThread::GetMaxStackSize());
RETURN_ON_PTHREAD_FAILURE(result);
@@ -154,12 +151,12 @@ intptr_t OSThread::GetMaxStackSize() {
ThreadId OSThread::GetCurrentThreadId() {
Ivan Posva 2015/08/17 13:35:52 This is currently used by the profiler and relies
zra 2015/08/18 06:23:14 Restored gettid() here, and added a GetCurrentThre
- return gettid();
+ return pthread_self();
}
bool OSThread::Join(ThreadId id) {
- return false;
+ return pthread_join(id, NULL) == 0;
}
@@ -170,7 +167,7 @@ intptr_t OSThread::ThreadIdToIntPtr(ThreadId id) {
bool OSThread::Compare(ThreadId a, ThreadId b) {
- return a == b;
+ return pthread_equal(a, b) != 0;
}

Powered by Google App Engine
This is Rietveld 408576698