mirror of
https://github.com/apache/nuttx.git
synced 2026-05-21 13:13:08 +08:00
sched/wdog: remove unnecessary list_node redefinition
The wdog implementation redefined `list_node`, which could cause conflicts or unexpected behavior when both `wdog/wdog.h` and `list.h` are included in the same source file. This patch removes the redundant definition to avoid such issues. Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
|
||||
#include <nuttx/compiler.h>
|
||||
#include <nuttx/clock.h>
|
||||
#include <nuttx/list.h>
|
||||
#include <errno.h>
|
||||
#include <stdint.h>
|
||||
|
||||
@@ -78,19 +79,11 @@ typedef uint32_t wdparm_t;
|
||||
|
||||
typedef CODE void (*wdentry_t)(wdparm_t arg);
|
||||
|
||||
/* Avoid the inclusion of nuttx/list.h */
|
||||
|
||||
struct wdlist_node
|
||||
{
|
||||
FAR struct wdlist_node *prev;
|
||||
FAR struct wdlist_node *next;
|
||||
};
|
||||
|
||||
/* Support a doubly linked list of watchdog timers */
|
||||
|
||||
struct wdog_s
|
||||
{
|
||||
struct wdlist_node node; /* Supports a doubly linked list */
|
||||
struct list_node node; /* Supports a doubly linked list */
|
||||
wdparm_t arg; /* Callback argument */
|
||||
wdentry_t func; /* Function to execute when delay expires */
|
||||
#ifdef CONFIG_PIC
|
||||
|
||||
@@ -36,17 +36,12 @@
|
||||
#include <nuttx/clock.h>
|
||||
#include <nuttx/queue.h>
|
||||
#include <nuttx/wdog.h>
|
||||
#include <nuttx/list.h>
|
||||
#include <nuttx/spinlock_type.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* Redefine to the standard list */
|
||||
|
||||
#define list_node wdlist_node
|
||||
|
||||
/****************************************************************************
|
||||
* Public Data
|
||||
****************************************************************************/
|
||||
|
||||
Reference in New Issue
Block a user