|
![](static/image/common/ico_lz.png)
楼主 |
发表于 2010-4-8 14:09:33
|
显示全部楼层
不要意思,是我看得不仔细,找到了
还是谢谢ffxz的及时答复。
libcpu/ arm/ AT91SAM7S/ start_gcc.S Line 170开始
vector_irq:
stmfd sp!, {r0-r12,lr}
bl rt_interrupt_enter
bl rt_hw_trap_irq
bl rt_interrupt_leave
/*
* if rt_thread_switch_interrput_flag set, jump to
* rt_hw_context_switch_interrupt_do and don't return
*/
ldr r0, =rt_thread_switch_interrput_flag
ldr r1, [r0]
cmp r1, #1
beq rt_hw_context_switch_interrupt_do
ldmfd sp!, {r0-r12,lr}
subs pc, lr, #4
vector_fiq:
stmfd sp!,{r0-r7,lr}
bl rt_hw_trap_fiq
ldmfd sp!,{r0-r7,lr}
subs pc,lr,#4
/*
* void rt_hw_context_switch_interrupt_do(rt_base_t flag)
*/
rt_hw_context_switch_interrupt_do:
mov r1, #0 /* clear flag */
str r1, [r0]
最后一步操作就是把变量rt_thread_switch_interrput_flag赋值为0. |
|