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

Side by Side Diff: tests/thread_capture/arch/mips/thread_capture_test_injection.c

Issue 1536713003: [MIPS] Make $t8 point to the address of TLS pointers (Closed) Base URL: https://chromium.googlesource.com/native_client/src/native_client@master
Patch Set: Move EditMipsCode() below EditArmCode(). Created 4 years, 11 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013 The Native Client Authors. All rights reserved. 2 * Copyright (c) 2013 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 #include "native_client/tests/thread_capture/thread_capture_test_injection.h" 7 #include "native_client/tests/thread_capture/thread_capture_test_injection.h"
8 8
9 #include "native_client/src/trusted/service_runtime/include/bits/nacl_syscalls.h " 9 #include "native_client/src/trusted/service_runtime/include/bits/nacl_syscalls.h "
10 #include "native_client/src/trusted/service_runtime/nacl_app_thread.h" 10 #include "native_client/src/trusted/service_runtime/nacl_app_thread.h"
11 #include "native_client/src/trusted/service_runtime/nacl_copy.h" 11 #include "native_client/src/trusted/service_runtime/nacl_copy.h"
12 #include "native_client/src/trusted/service_runtime/nacl_syscall_register.h" 12 #include "native_client/src/trusted/service_runtime/nacl_syscall_register.h"
13 #include "native_client/src/trusted/service_runtime/nacl_tls.h" 13 #include "native_client/src/trusted/service_runtime/nacl_tls.h"
14 14
15 static int32_t TestSyscall(struct NaClAppThread *natp) { 15 static int32_t TestSyscall(struct NaClAppThread *natp) {
16 UNREFERENCED_PARAMETER(natp); 16 UNREFERENCED_PARAMETER(natp);
17 17
18 g_nacl_syscall_thread_capture_fault_addr = 18 g_nacl_syscall_thread_capture_fault_addr =
19 (uintptr_t) &NaClSyscallThreadCaptureFault; 19 (uintptr_t) &NaClSyscallThreadCaptureFault;
20 20
21 NaClTlsSetCurrentThread(NULL); 21 natp->user.guard_token++;
22 22
23 return 0; 23 return 0;
24 } 24 }
25 25
26 NACL_DEFINE_SYSCALL_0(TestSyscall) 26 NACL_DEFINE_SYSCALL_0(TestSyscall)
27 27
28 void NaClInjectThreadCaptureSyscall(struct NaClApp *nap) { 28 void NaClInjectThreadCaptureSyscall(struct NaClApp *nap) {
29 NACL_REGISTER_SYSCALL(nap, TestSyscall, NACL_sys_test_syscall_1); 29 NACL_REGISTER_SYSCALL(nap, TestSyscall, NACL_sys_test_syscall_1);
30 } 30 }
OLDNEW
« no previous file with comments | « src/trusted/service_runtime/arch/mips/sel_rt.c ('k') | tests/thread_capture/nacl_thread_capture_test_injection_test.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698