sched/wdog: Use list_in_list() to detect active watchdogs

Use list_in_list() to determine whether a watchdog is active,
     eliminating the need to set the watchdog function pointer to NULL
     as an indicator of inactivity.

Signed-off-by: Chengdong Wang wangchengdong@lixiang.com
This commit is contained in:
wangchengdong
2025-11-06 19:01:38 +08:00
committed by archer
parent 22a9228479
commit 190daef2bf
3 changed files with 1 additions and 7 deletions

View File

@@ -39,7 +39,7 @@
* Pre-processor Definitions
****************************************************************************/
#define WDOG_ISACTIVE(w) ((w)->func != NULL)
#define WDOG_ISACTIVE(w) (list_in_list(&((w)->node)))
/* The maximum delay tick are supposed to be CLOCK_MAX >> 1.
* However, if there are expired wdog timers in the wdog queue,