You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by gu...@apache.org on 2022/03/12 18:06:53 UTC

[incubator-nuttx] 03/07: sched/wdog: Remove wd_initialize which isn't really used anymore

This is an automated email from the ASF dual-hosted git repository.

gustavonihei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit b0786606fc5bec29464fb197b9b2c80fa265d44a
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sat Mar 12 04:01:19 2022 +0800

    sched/wdog: Remove wd_initialize which isn't really used anymore
    
    since g_wdactivelist is already set to zero by the boot code
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 sched/init/nx_start.c      | 14 +-------------
 sched/wdog/wd_initialize.c | 26 --------------------------
 sched/wdog/wdog.h          | 21 ---------------------
 3 files changed, 1 insertion(+), 60 deletions(-)

diff --git a/sched/init/nx_start.c b/sched/init/nx_start.c
index 3fb1cba..aeafd5f 100644
--- a/sched/init/nx_start.c
+++ b/sched/init/nx_start.c
@@ -46,11 +46,8 @@
 
 #include "sched/sched.h"
 #include "signal/signal.h"
-#include "wdog/wdog.h"
 #include "semaphore/semaphore.h"
-#ifndef CONFIG_DISABLE_MQUEUE
-#  include "mqueue/mqueue.h"
-#endif
+#include "mqueue/mqueue.h"
 #include "clock/clock.h"
 #include "timer/timer.h"
 #include "irq/irq.h"
@@ -627,15 +624,6 @@ void nx_start(void)
       irq_initialize();
     }
 
-  /* Initialize the watchdog facility (if included in the link) */
-
-#ifdef CONFIG_HAVE_WEAKFUNCTIONS
-  if (wd_initialize != NULL)
-#endif
-    {
-      wd_initialize();
-    }
-
   /* Initialize the POSIX timer facility (if included in the link) */
 
 #ifdef CONFIG_HAVE_WEAKFUNCTIONS
diff --git a/sched/wdog/wd_initialize.c b/sched/wdog/wd_initialize.c
index 4062802..5b4f624 100644
--- a/sched/wdog/wd_initialize.c
+++ b/sched/wdog/wd_initialize.c
@@ -50,29 +50,3 @@ clock_t g_wdtickbase;
 /****************************************************************************
  * Public Functions
  ****************************************************************************/
-
-/****************************************************************************
- * Name: wd_initialize
- *
- * Description:
- * This function initializes the watchdog data structures
- *
- * Input Parameters:
- *   None
- *
- * Returned Value:
- *   None
- *
- * Assumptions:
- *   This function must be called early in the initialization sequence
- *   before the timer interrupt is attached and before any watchdog
- *   services are used.
- *
- ****************************************************************************/
-
-void wd_initialize(void)
-{
-  /* Initialize watchdog lists */
-
-  sq_init(&g_wdactivelist);
-}
diff --git a/sched/wdog/wdog.h b/sched/wdog/wdog.h
index c527976..76b7144 100644
--- a/sched/wdog/wdog.h
+++ b/sched/wdog/wdog.h
@@ -87,27 +87,6 @@ extern clock_t g_wdtickbase;
  ****************************************************************************/
 
 /****************************************************************************
- * Name: wd_initialize
- *
- * Description:
- * This function initializes the watchdog data structures
- *
- * Input Parameters:
- *   None
- *
- * Returned Value:
- *   None
- *
- * Assumptions:
- *   This function must be called early in the initialization sequence
- *   before the timer interrupt is attached and before any watchdog
- *   services are used.
- *
- ****************************************************************************/
-
-void weak_function wd_initialize(void);
-
-/****************************************************************************
  * Name: wd_timer
  *
  * Description: