Fix old lock_cnt and isr_cnt

This commit is contained in:
Fabien Poussin 2017-03-29 18:15:10 +02:00
parent 9f75cd5c75
commit a7cf2d82ef
3 changed files with 3 additions and 7 deletions

View File

@ -522,9 +522,8 @@ extern "C"
#ifndef __ASSEMBLER__
#if !CH_DBG_SYSTEM_STATE_CHECK
extern cnt_t dbg_lock_cnt;
#define dbg_enter_lock() {dbg_lock_cnt = 1;ON_LOCK_HOOK;}
#define dbg_leave_lock() {ON_UNLOCK_HOOK;dbg_lock_cnt = 0;}
#define dbg_enter_lock() {ch.dbg.lock_cnt = 1;ON_LOCK_HOOK;}
#define dbg_leave_lock() {ON_UNLOCK_HOOK;ch.dbg.lock_cnt = 0;}
#endif
void chDbgPanic3(const char *msg, const char * file, int line);

View File

@ -59,7 +59,7 @@ extern uint32_t IRQSTACK$$Base; /* symbol created by the IAR linker */
int getRemainingStack(Thread *otp) {
#if CH_DBG_ENABLE_STACK_CHECK || defined(__DOXYGEN__)
int remainingStack;
if (dbg_isr_cnt > 0) {
if (ch.dbg.isr_cnt > 0) {
remainingStack = (__get_SP() - sizeof(intctx_t)) - (int)&IRQSTACK$$Base;
} else {
remainingStack = (__get_SP() - sizeof(intctx_t)) - (int)otp->p_stklimit;

View File

@ -75,6 +75,3 @@ void chVTSetAny(virtual_timer_t *vtp, systime_t time, vtfunc_t vtfunc, void *par
}
#endif
cnt_t dbg_lock_cnt;
cnt_t dbg_isr_cnt;