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

Side by Side Diff: src/trusted/service_runtime/nacl_syscall_hook.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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The Native Client Authors. All rights reserved. 2 * Copyright (c) 2012 The Native Client Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be 3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file. 4 * found in the LICENSE file.
5 */ 5 */
6 6
7 /* 7 /*
8 * NaCl service run-time. 8 * NaCl service run-time.
9 */ 9 */
10 10
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 155
156 /* 156 /*
157 * before switching back to user module, we need to make sure that the 157 * before switching back to user module, we need to make sure that the
158 * user_ret is properly sandboxed. 158 * user_ret is properly sandboxed.
159 */ 159 */
160 user_ret = (nacl_reg_t) NaClSandboxCodeAddr(nap, (uintptr_t) user_ret); 160 user_ret = (nacl_reg_t) NaClSandboxCodeAddr(nap, (uintptr_t) user_ret);
161 /* 161 /*
162 * After this NaClAppThreadSetSuspendState() call, we should not 162 * After this NaClAppThreadSetSuspendState() call, we should not
163 * claim any mutexes, otherwise we risk deadlock. Note that if 163 * claim any mutexes, otherwise we risk deadlock. Note that if
164 * NACLVERBOSITY is set high enough to enable the NaClLog() calls in 164 * NACLVERBOSITY is set high enough to enable the NaClLog() calls in
165 * NaClSwitchToApp(), these calls could deadlock on Windows. 165 * NaClSwitchToApp(), these calls could deadlock.
166 */ 166 */
167 NaClAppThreadSetSuspendState(natp, NACL_APP_THREAD_TRUSTED, 167 NaClAppThreadSetSuspendState(natp, NACL_APP_THREAD_TRUSTED,
168 NACL_APP_THREAD_UNTRUSTED); 168 NACL_APP_THREAD_UNTRUSTED);
169 NaClStackSafetyNowOnUntrustedStack(); 169 NaClStackSafetyNowOnUntrustedStack();
170 170
171 NaClSwitchToApp(natp, user_ret); 171 NaClSwitchToApp(natp, user_ret);
172 /* NOTREACHED */ 172 /* NOTREACHED */
173 173
174 fprintf(stderr, "NORETURN NaClSwitchToApp returned!?!\n"); 174 fprintf(stderr, "NORETURN NaClSwitchToApp returned!?!\n");
175 NaClAbort(); 175 NaClAbort();
176 } 176 }
OLDNEW
« no previous file with comments | « src/trusted/service_runtime/nacl_signal.h ('k') | src/trusted/service_runtime/posix/nacl_signal.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698