Fix old lock_cnt and isr_cnt
This commit is contained in:
parent
9f75cd5c75
commit
a7cf2d82ef
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
Loading…
Reference in New Issue