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

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

Issue 12667019: [MIPS] Support for building tests for MIPS (Closed) Base URL: http://git.chromium.org/native_client/src/native_client.git@master
Patch Set: updates to sandboxed_mips.S. Created 7 years, 9 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) 2012 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/include/portability.h"
10 #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 "
11 #include "native_client/src/trusted/service_runtime/nacl_app_thread.h" 10 #include "native_client/src/trusted/service_runtime/nacl_app_thread.h"
12 #include "native_client/src/trusted/service_runtime/nacl_copy.h" 11 #include "native_client/src/trusted/service_runtime/nacl_copy.h"
13 #include "native_client/src/trusted/service_runtime/nacl_syscall_common.h" 12 #include "native_client/src/trusted/service_runtime/nacl_syscall_common.h"
14 #include "native_client/src/trusted/service_runtime/nacl_tls.h" 13 #include "native_client/src/trusted/service_runtime/nacl_tls.h"
15 14
16 static int32_t TestSyscall(struct NaClAppThread *natp) { 15 static int32_t TestSyscall(struct NaClAppThread *natp) {
17 g_nacl_syscall_thread_capture_fault_addr = 16 g_nacl_syscall_thread_capture_fault_addr =
18 (uintptr_t) &NaClSyscallThreadCaptureFault; 17 (uintptr_t) &NaClSyscallThreadCaptureFault;
19 18
20 NaClCopyDropLock(natp->nap); 19 NaClCopyDropLock(natp->nap);
21 20
22 NaClTlsSetCurrentThread(NULL); 21 NaClTlsSetCurrentThread(NULL);
23 22
24 return 0; 23 return 0;
25 } 24 }
26 25
27 void NaClInjectThreadCaptureSyscall(struct NaClApp *nap) { 26 void NaClInjectThreadCaptureSyscall(struct NaClApp *nap) {
28 UNREFERENCED_PARAMETER(nap); 27 UNREFERENCED_PARAMETER(nap);
29 28
30 NaClAddSyscall(NACL_sys_test_syscall_1, TestSyscall); 29 NaClAddSyscall(NACL_sys_test_syscall_1, TestSyscall);
31 } 30 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698