mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 01:05:54 +08:00
sched/wdog: Remove flags field from wdog_s to save memory
since WDOG_ISACTIVE can check func field instead Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com> Change-Id: I21d7f9cfe6195c8ccb6cc5925ff66f3c89822f9d
This commit is contained in:
committed by
Alan Carvalho de Assis
parent
179f5999d9
commit
d7d3177668
+1
-10
@@ -34,15 +34,7 @@
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* Watchdog Definitions *****************************************************/
|
||||
|
||||
/* Flag bits for the flags field of struct wdog_s */
|
||||
|
||||
#define WDOGF_ACTIVE (1 << 0) /* Bit 0: 1=Watchdog is actively timing */
|
||||
|
||||
#define WDOG_SETACTIVE(w) do { (w)->flags |= WDOGF_ACTIVE; } while (0)
|
||||
#define WDOG_CLRACTIVE(w) do { (w)->flags &= ~WDOGF_ACTIVE; } while (0)
|
||||
#define WDOG_ISACTIVE(w) (((w)->flags & WDOGF_ACTIVE) != 0)
|
||||
#define WDOG_ISACTIVE(w) ((w)->func != NULL)
|
||||
|
||||
/****************************************************************************
|
||||
* Public Type Declarations
|
||||
@@ -78,7 +70,6 @@ struct wdog_s
|
||||
FAR void *picbase; /* PIC base address */
|
||||
#endif
|
||||
int lag; /* Timer associated with the delay */
|
||||
uint8_t flags; /* See WDOGF_* definitions above */
|
||||
wdparm_t arg; /* Callback argument */
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user