summaryrefslogtreecommitdiffstats
path: root/nuttx/sched/os_start.c
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/sched/os_start.c')
-rw-r--r--nuttx/sched/os_start.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/nuttx/sched/os_start.c b/nuttx/sched/os_start.c
index 740cffa10d..4cb128d3cc 100644
--- a/nuttx/sched/os_start.c
+++ b/nuttx/sched/os_start.c
@@ -57,6 +57,7 @@
# include "pthread_internal.h"
#endif
#include "clock_internal.h"
+#include "timer_internal.h"
#include "irq_internal.h"
/************************************************************
@@ -304,6 +305,15 @@ void os_start(void)
user_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) */
#ifndef CONFIG_DISABLE_CLOCK
@@ -315,14 +325,14 @@ void os_start(void)
}
#endif
- /* Initialize the watchdog facility (if included in the link) */
-
+#ifndef CONFIG_DISABLE_POSIX_TIMERS
#ifdef CONFIG_HAVE_WEAKFUNCTIONS
- if (wd_initialize != NULL)
+ if (timer_initialize != NULL)
#endif
{
- wd_initialize();
+ timer_initialize();
}
+#endif
/* Initialize the signal facility (if in link) */