| OLD | NEW |
| 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 Loading... |
| 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 } |
| OLD | NEW |