From fa141e270361bc75da809abe3c6d44c4dc22c46b Mon Sep 17 00:00:00 2001 From: rusefi Date: Sun, 21 May 2017 12:58:53 -0400 Subject: [PATCH] lock/unlock hooks --- os/rt/include/chdebug.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/os/rt/include/chdebug.h b/os/rt/include/chdebug.h index c4fd39f39..54020bdf1 100644 --- a/os/rt/include/chdebug.h +++ b/os/rt/include/chdebug.h @@ -121,8 +121,8 @@ typedef struct { /*===========================================================================*/ #if CH_DBG_SYSTEM_STATE_CHECK == TRUE -#define _dbg_enter_lock() (ch.dbg.lock_cnt = (cnt_t)1) -#define _dbg_leave_lock() (ch.dbg.lock_cnt = (cnt_t)0) +#define _dbg_enter_lock() {(ch.dbg.lock_cnt = (cnt_t)1); ON_LOCK_HOOK;} +#define _dbg_leave_lock() {ON_UNLOCK_HOOK;(ch.dbg.lock_cnt = (cnt_t)0);} #endif /* When the state checker feature is disabled then the following functions