mirror of
https://github.com/apache/nuttx.git
synced 2025-12-16 17:56:38 +08:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user