File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -128,9 +128,9 @@ void ctx_switch(void)
128
128
asm("mov r12, sp" );
129
129
asm("stmfd r12!, {r4-r11}" );
130
130
131
- /* save user mode stack pointer in *active_thread */
132
- asm("ldr r1, =active_thread " ); /* r1 = &active_thread */
133
- asm("ldr r1, [r1]" ); /* r1 = *r1 = active_thread */
131
+ /* save user mode stack pointer in *sched_active_thread */
132
+ asm("ldr r1, =sched_active_thread " ); /* r1 = &sched_active_thread */
133
+ asm("ldr r1, [r1]" ); /* r1 = *r1 = sched_active_thread */
134
134
asm("str r12, [r1]" ); /* store stack pointer in tasks pdc*/
135
135
136
136
sched_task_return ();
@@ -145,8 +145,8 @@ void sched_task_return(void)
145
145
mode .b .nPRIV = 0 ; // privilege
146
146
__set_CONTROL (mode .w );
147
147
/* load pdc->stackpointer in r0 */
148
- asm("ldr r0, =active_thread " ); /* r0 = &active_thread */
149
- asm("ldr r0, [r0]" ); /* r0 = *r0 = active_thread */
148
+ asm("ldr r0, =sched_active_thread " ); /* r0 = &sched_active_thread */
149
+ asm("ldr r0, [r0]" ); /* r0 = *r0 = sched_active_thread */
150
150
asm("ldr sp, [r0]" ); /* sp = r0 restore stack pointer*/
151
151
asm("pop {r4}" ); /* skip exception return */
152
152
asm("pop {r4-r11}" );
Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ __attribute__((always_inline)) __INLINE void save_context(void)
73
73
asm("stmdb r0!,{lr}" ); // exception return value
74
74
// asm("vstmdb sp!, {s16-s31}" ); // FIXME save fpu registers if needed
75
75
/* load address of currend pdc */
76
- asm("ldr r1, =active_thread " ); /* load address of currend tcb */
76
+ asm("ldr r1, =sched_active_thread " );/* load address of currend tcb */
77
77
/* deref pdc */
78
78
asm("ldr r1, [r1]" ); /* deref pdc */
79
79
/* write r0 to pdc->sp means current threads stack pointer */
@@ -82,7 +82,7 @@ __attribute__((always_inline)) __INLINE void save_context(void)
82
82
83
83
__attribute__((always_inline )) __INLINE void restore_context (void )
84
84
{
85
- asm("ldr r0, =active_thread " ); /* load address of currend tcb */
85
+ asm("ldr r0, =sched_active_thread " );/* load address of currend tcb */
86
86
asm("ldr r0, [r0]" ); /* deref tcb */
87
87
asm("ldr r1, [r0]" ); /* load tcb->sp to register 1 */
88
88
asm("ldmia r1!, {r0}" ); /* restore exception retrun value from stack */
Original file line number Diff line number Diff line change @@ -314,7 +314,7 @@ void _exit(int n)
314
314
/*---------------------------------------------------------------------------*/
315
315
int _getpid (void )
316
316
{
317
- return active_thread -> pid ;
317
+ return sched_active_thread -> pid ;
318
318
}
319
319
/*---------------------------------------------------------------------------*/
320
320
int _kill_r (struct _reent * r , int pid , int sig )
You can’t perform that action at this time.
0 commit comments