STM8, MSP430 and AVR ports adjusted for state checker option.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3229 35acf78f-673a-0410-8e92-d51de3d6d3f4master
parent
930cd17e55
commit
c4f7ff481d
|
@ -123,7 +123,7 @@ void port_halt(void) {
|
||||||
*/
|
*/
|
||||||
void _port_thread_start(void) {
|
void _port_thread_start(void) {
|
||||||
|
|
||||||
asm volatile ("sei");
|
chSysUnlock();
|
||||||
asm volatile ("movw r24, r4");
|
asm volatile ("movw r24, r4");
|
||||||
asm volatile ("movw r30, r2");
|
asm volatile ("movw r30, r2");
|
||||||
asm volatile ("icall");
|
asm volatile ("icall");
|
||||||
|
|
|
@ -215,8 +215,10 @@ struct context {
|
||||||
* enabled to invoke system APIs.
|
* enabled to invoke system APIs.
|
||||||
*/
|
*/
|
||||||
#define PORT_IRQ_EPILOGUE() { \
|
#define PORT_IRQ_EPILOGUE() { \
|
||||||
|
dbg_check_lock(); \
|
||||||
if (chSchIsPreemptionRequired()) \
|
if (chSchIsPreemptionRequired()) \
|
||||||
chSchDoReschedule(); \
|
chSchDoReschedule(); \
|
||||||
|
dbg_check_unlock(); \
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -93,8 +93,8 @@ void port_halt(void) {
|
||||||
*/
|
*/
|
||||||
void _port_thread_start(void) {
|
void _port_thread_start(void) {
|
||||||
|
|
||||||
asm volatile ("eint \n\t" \
|
chSysUnlock();
|
||||||
"mov r11, r15 \n\t" \
|
asm volatile ("mov r11, r15 \n\t" \
|
||||||
"call r10 \n\t" \
|
"call r10 \n\t" \
|
||||||
"call #chThdExit");
|
"call #chThdExit");
|
||||||
}
|
}
|
||||||
|
|
|
@ -184,8 +184,10 @@ struct context {
|
||||||
* enabled to invoke system APIs.
|
* enabled to invoke system APIs.
|
||||||
*/
|
*/
|
||||||
#define PORT_IRQ_EPILOGUE() { \
|
#define PORT_IRQ_EPILOGUE() { \
|
||||||
|
dbg_check_lock(); \
|
||||||
if (chSchIsPreemptionRequired()) \
|
if (chSchIsPreemptionRequired()) \
|
||||||
chSchDoReschedule(); \
|
chSchDoReschedule(); \
|
||||||
|
dbg_check_unlock(); \
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -220,7 +222,11 @@ struct context {
|
||||||
/**
|
/**
|
||||||
* @brief Kernel-lock action from an interrupt handler.
|
* @brief Kernel-lock action from an interrupt handler.
|
||||||
* @details This function is invoked before invoking I-class APIs from
|
* @details This function is invoked before invoking I-class APIs from
|
||||||
* interrupt handlers. The implementation is architecture dependent,
|
* interrupt handlers. The implementation is architecture dependen#define PORT_IRQ_EPILOGUE() { \
|
||||||
|
if (chSchIsPreemptionRequired()) \
|
||||||
|
chSchDoReschedule(); \
|
||||||
|
}
|
||||||
|
* t,
|
||||||
* in its simplest form it is void.
|
* in its simplest form it is void.
|
||||||
* @note This function is empty in this port.
|
* @note This function is empty in this port.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -54,8 +54,8 @@ void _port_switch(Thread *otp) {
|
||||||
*/
|
*/
|
||||||
void _port_thread_start(void) {
|
void _port_thread_start(void) {
|
||||||
|
|
||||||
|
chSysUnlock();
|
||||||
#pragma ASM
|
#pragma ASM
|
||||||
RIM
|
|
||||||
POPW X
|
POPW X
|
||||||
#pragma ENDASM
|
#pragma ENDASM
|
||||||
}
|
}
|
||||||
|
|
|
@ -206,8 +206,10 @@ struct stm8_startctx {
|
||||||
* enabled to invoke system APIs.
|
* enabled to invoke system APIs.
|
||||||
*/
|
*/
|
||||||
#define PORT_IRQ_EPILOGUE() { \
|
#define PORT_IRQ_EPILOGUE() { \
|
||||||
|
dbg_check_lock(); \
|
||||||
if (chSchIsPreemptionRequired()) \
|
if (chSchIsPreemptionRequired()) \
|
||||||
chSchDoReschedule(); \
|
chSchDoReschedule(); \
|
||||||
|
dbg_check_unlock(); \
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -50,8 +50,8 @@ void _port_switch(Thread *otp) {
|
||||||
*/
|
*/
|
||||||
void _port_thread_start(void) {
|
void _port_thread_start(void) {
|
||||||
|
|
||||||
_asm(" rim \n"
|
chSysUnlock();
|
||||||
" popw x \n");
|
_asm(" popw x \n");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -203,8 +203,10 @@ struct stm8_startctx {
|
||||||
* enabled to invoke system APIs.
|
* enabled to invoke system APIs.
|
||||||
*/
|
*/
|
||||||
#define PORT_IRQ_EPILOGUE() { \
|
#define PORT_IRQ_EPILOGUE() { \
|
||||||
|
dbg_check_lock(); \
|
||||||
if (chSchIsPreemptionRequired()) \
|
if (chSchIsPreemptionRequired()) \
|
||||||
chSchDoReschedule(); \
|
chSchDoReschedule(); \
|
||||||
|
dbg_check_unlock(); \
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue