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-d51de3d6d3f4
master
gdisirio 2011-08-14 09:40:19 +00:00
parent 930cd17e55
commit c4f7ff481d
12 changed files with 62 additions and 50 deletions

View File

@ -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");

View File

@ -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(); \
} }
/** /**

View File

@ -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");
} }

View File

@ -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.
*/ */

View File

@ -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
} }

View File

@ -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(); \
} }
/** /**

View File

@ -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");
} }
/** /**

View File

@ -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(); \
} }
/** /**