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

Unified Diff: src/trusted/service_runtime/linux/thread_suspension.c

Issue 11543028: Allow creating a NaClAppThread without creating a new host OS thread (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Review: Add NACL_WUR Created 8 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 | « no previous file | src/trusted/service_runtime/nacl_app_thread.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/trusted/service_runtime/linux/thread_suspension.c
diff --git a/src/trusted/service_runtime/linux/thread_suspension.c b/src/trusted/service_runtime/linux/thread_suspension.c
index d00c72bfc67f170eb26486ed467076edf7e3a491..1c2d07d2ba9f7bc348f385998135d9d90022a7ff 100644
--- a/src/trusted/service_runtime/linux/thread_suspension.c
+++ b/src/trusted/service_runtime/linux/thread_suspension.c
@@ -251,7 +251,8 @@ void NaClUntrustedThreadSuspend(struct NaClAppThread *natp,
NaClLog(LOG_FATAL, "NaClUntrustedThreadSuspend: malloc() failed\n");
}
}
- if (pthread_kill(natp->thread.tid, NACL_THREAD_SUSPEND_SIGNAL) != 0) {
+ CHECK(natp->host_thread_is_defined);
+ if (pthread_kill(natp->host_thread.tid, NACL_THREAD_SUSPEND_SIGNAL) != 0) {
NaClLog(LOG_FATAL, "NaClUntrustedThreadSuspend: "
"pthread_kill() call failed\n");
}
« no previous file with comments | « no previous file | src/trusted/service_runtime/nacl_app_thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698