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

Unified Diff: src/trusted/service_runtime/nacl_app_thread.c

Issue 10392005: Thread suspension: Implement for Linux (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Comment about docs Created 8 years, 7 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
« no previous file with comments | « src/trusted/service_runtime/nacl_app_thread.h ('k') | src/trusted/service_runtime/nacl_signal.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/trusted/service_runtime/nacl_app_thread.c
diff --git a/src/trusted/service_runtime/nacl_app_thread.c b/src/trusted/service_runtime/nacl_app_thread.c
index 00e7c37b507537014c5f232f3d28d26ee1c6406b..cce568baa71147c38ae523e01081b4478d73d7c5 100644
--- a/src/trusted/service_runtime/nacl_app_thread.c
+++ b/src/trusted/service_runtime/nacl_app_thread.c
@@ -21,28 +21,6 @@
#include "native_client/src/trusted/service_runtime/nacl_syscall_common.h"
-void NaClAppThreadSetSuspendState(struct NaClAppThread *natp,
- enum NaClSuspendState old_state,
- enum NaClSuspendState new_state) {
-#if NACL_WINDOWS
- NaClXMutexLock(&natp->mu);
- while ((natp->suspend_state & NACL_APP_THREAD_SUSPENDING) != 0) {
- /*
- * We are being suspended, but SuspendThread() has not taken effect yet.
- */
- NaClXCondVarWait(&natp->cv, &natp->mu);
- }
- DCHECK(natp->suspend_state == old_state);
- natp->suspend_state = new_state;
- NaClXMutexUnlock(&natp->mu);
-#else
- UNREFERENCED_PARAMETER(natp);
- UNREFERENCED_PARAMETER(old_state);
- UNREFERENCED_PARAMETER(new_state);
-#endif
-}
-
-
void WINAPI NaClThreadLauncher(void *state) {
struct NaClAppThread *natp = (struct NaClAppThread *) state;
uint32_t thread_idx;
@@ -222,9 +200,7 @@ int NaClAppThreadCtor(struct NaClAppThread *natp,
goto cleanup_cv;
}
-#if NACL_WINDOWS
natp->suspend_state = NACL_APP_THREAD_TRUSTED;
-#endif
natp->thread_num = -1; /* illegal index */
natp->sys_tls = sys_tls;
« no previous file with comments | « src/trusted/service_runtime/nacl_app_thread.h ('k') | src/trusted/service_runtime/nacl_signal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698