mirror of https://github.com/rusefi/ChibiOS.git
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@471 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
8687fa6113
commit
8c778229e5
|
@ -50,8 +50,7 @@ __attribute__((naked))
|
|||
void chSysSwitchI(Thread *otp, Thread *ntp) {
|
||||
register struct intctx *sp asm("r1");
|
||||
|
||||
asm volatile ("push r2 \n\t" \
|
||||
"push r11 \n\t" \
|
||||
asm volatile ("push r11 \n\t" \
|
||||
"push r10 \n\t" \
|
||||
"push r9 \n\t" \
|
||||
"push r8 \n\t" \
|
||||
|
@ -69,7 +68,7 @@ void chSysSwitchI(Thread *otp, Thread *ntp) {
|
|||
"pop r9 \n\t" \
|
||||
"pop r10 \n\t" \
|
||||
"pop r11 \n\t" \
|
||||
"reti" : : "r" (sp));
|
||||
"ret" : : "r" (sp));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -80,7 +79,8 @@ void chSysPuts(char *msg) {
|
|||
|
||||
void threadstart(void) {
|
||||
|
||||
asm volatile ("mov r11, r15 \n\t" \
|
||||
asm volatile ("eint \n\t" \
|
||||
"mov r11, r15 \n\t" \
|
||||
"call r10 \n\t" \
|
||||
"call #chThdExit");
|
||||
}
|
||||
|
|
|
@ -51,7 +51,7 @@ struct intctx {
|
|||
regmsp r9;
|
||||
regmsp r10;
|
||||
regmsp r11;
|
||||
regmsp sr;
|
||||
// regmsp sr;
|
||||
regmsp pc;
|
||||
};
|
||||
|
||||
|
@ -65,7 +65,6 @@ typedef struct {
|
|||
sizeof(struct intctx)); \
|
||||
tp->p_ctx.sp->r10 = pf; \
|
||||
tp->p_ctx.sp->r11 = arg; \
|
||||
tp->p_ctx.sp->sr = (regmsp)GIE; \
|
||||
tp->p_ctx.sp->pc = threadstart; \
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue