git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@243 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
d63f9c27be
commit
813f114c7f
|
@ -77,6 +77,19 @@ void *retaddr;
|
|||
*/
|
||||
void SysTickVector(void) {
|
||||
|
||||
chSysIRQEnterI();
|
||||
|
||||
chSysTimerHandlerI();
|
||||
|
||||
chSysIRQExitI();
|
||||
}
|
||||
|
||||
/*
|
||||
* To be invoked at the end of any interrupt handler that can trigger a
|
||||
* reschedule.
|
||||
*/
|
||||
void chSysIRQExitI(void) {
|
||||
|
||||
chSysLock();
|
||||
if (SCB->ICSR & (1 << 11)) { /* RETTOBASE */
|
||||
if (chSchRescRequiredI()) {
|
||||
|
@ -87,7 +100,7 @@ void SysTickVector(void) {
|
|||
"str r2, [r1] \n\t" \
|
||||
"ldr r1, =threadswitch \n\t" \
|
||||
"str r1, [r0, #18] ");
|
||||
return;
|
||||
return; /* Note, returns *without* re-enabling interrupts.*/
|
||||
}
|
||||
}
|
||||
chSysUnlock();
|
||||
|
|
|
@ -85,12 +85,7 @@ typedef struct {
|
|||
INT_REQUIRED_STACK)
|
||||
#define WorkingArea(s, n) uint32_t s[UserStackSize(n) >> 2];
|
||||
|
||||
#define chSysIRQEnterI() { \
|
||||
}
|
||||
|
||||
#define chSysIRQExitI() { \
|
||||
asm("b IrqCommon \n\t"); \
|
||||
}
|
||||
#define chSysIRQEnterI()
|
||||
|
||||
/* It requires zero bytes, but better be safe.*/
|
||||
#define IDLE_THREAD_STACK_SIZE 8
|
||||
|
@ -100,5 +95,6 @@ void chSysHalt(void);
|
|||
void chSysSwitchI(Thread *otp, Thread *ntp);
|
||||
void chSysPuts(char *msg);
|
||||
void threadstart(void);
|
||||
void chSysIRQExitI(void);
|
||||
|
||||
#endif /* _CHCORE_H_ */
|
||||
|
|
Loading…
Reference in New Issue