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: src/trusted/service_runtime/arch/arm/nacl_switch_to_app_arm.c

Issue 10806080: ARM: Rename the "new_eip" field in NaClThreadContext to "new_prog_ctr" (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Rebase + copyright Created 8 years, 4 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 Runtime, C-level context switch code. 8 * NaCl Service Runtime, C-level context switch code.
9 */ 9 */
10 10
(...skipping 14 matching lines...) Expand all
25 25
26 NORETURN void NaClStartThreadInApp(struct NaClAppThread *natp, 26 NORETURN void NaClStartThreadInApp(struct NaClAppThread *natp,
27 uint32_t new_prog_ctr) { 27 uint32_t new_prog_ctr) {
28 struct NaClApp *nap; 28 struct NaClApp *nap;
29 struct NaClThreadContext *context; 29 struct NaClThreadContext *context;
30 30
31 natp->sys.stack_ptr = NaClGetStackPtr() & ~0xf; 31 natp->sys.stack_ptr = NaClGetStackPtr() & ~0xf;
32 32
33 nap = natp->nap; 33 nap = natp->nap;
34 context = &natp->user; 34 context = &natp->user;
35 context->new_eip = new_prog_ctr; 35 context->new_prog_ctr = new_prog_ctr;
36 36
37 /* 37 /*
38 * At startup this is not the return value, but the first argument. 38 * At startup this is not the return value, but the first argument.
39 * In the initial thread, it gets the pointer to the information 39 * In the initial thread, it gets the pointer to the information
40 * block on the stack. Additional threads do not expect anything in 40 * block on the stack. Additional threads do not expect anything in
41 * particular in the first argument register, so we don't bother to 41 * particular in the first argument register, so we don't bother to
42 * conditionalize this. 42 * conditionalize this.
43 */ 43 */
44 context->sysret = context->stack_ptr; 44 context->sysret = context->stack_ptr;
45 45
(...skipping 10 matching lines...) Expand all
56 /* 56 /*
57 * syscall return 57 * syscall return
58 */ 58 */
59 NORETURN void NaClSwitchToApp(struct NaClAppThread *natp, 59 NORETURN void NaClSwitchToApp(struct NaClAppThread *natp,
60 uint32_t new_prog_ctr) { 60 uint32_t new_prog_ctr) {
61 struct NaClApp *nap; 61 struct NaClApp *nap;
62 struct NaClThreadContext *context; 62 struct NaClThreadContext *context;
63 63
64 nap = natp->nap; 64 nap = natp->nap;
65 context = &natp->user; 65 context = &natp->user;
66 context->new_eip = new_prog_ctr; 66 context->new_prog_ctr = new_prog_ctr;
67 context->sysret = natp->sysret; 67 context->sysret = natp->sysret;
68 68
69 NaClSwitch(context); 69 NaClSwitch(context);
70 } 70 }
OLDNEW
« no previous file with comments | « src/trusted/service_runtime/arch/arm/nacl_switch.S ('k') | src/trusted/service_runtime/arch/arm/sel_rt.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698