File tree Expand file tree Collapse file tree 4 files changed +22
-10
lines changed Expand file tree Collapse file tree 4 files changed +22
-10
lines changed Original file line number Diff line number Diff line change @@ -528,9 +528,7 @@ void nxsched_alarm_tick_expiration(clock_t ticks)
528
528
529
529
/* Process the timer ticks and set up the next interval (or not) */
530
530
531
- g_wdtimernested ++ ;
532
531
nexttime = nxsched_timer_process (ticks , elapsed , false);
533
- g_wdtimernested -- ;
534
532
535
533
nxsched_timer_start (nexttime );
536
534
#ifdef CONFIG_SMP
Original file line number Diff line number Diff line change 39
39
40
40
struct list_node g_wdactivelist = LIST_INITIAL_VALUE (g_wdactivelist );
41
41
42
- #ifdef CONFIG_SCHED_TICKLESS
43
- unsigned int g_wdtimernested ;
44
- #endif
45
-
46
42
/****************************************************************************
47
43
* Public Functions
48
44
****************************************************************************/
Original file line number Diff line number Diff line change 69
69
# define CALL_FUNC (func , arg ) func(arg)
70
70
#endif
71
71
72
+ /****************************************************************************
73
+ * Private Data
74
+ ****************************************************************************/
75
+
76
+ #ifdef CONFIG_SCHED_TICKLESS
77
+ static unsigned int g_wdtimernested ;
78
+ #endif
79
+
72
80
/****************************************************************************
73
81
* Private Functions
74
82
****************************************************************************/
@@ -93,6 +101,14 @@ static inline_function void wd_expiration(clock_t ticks)
93
101
FAR struct wdog_s * wdog ;
94
102
wdentry_t func ;
95
103
104
+ #ifdef CONFIG_SCHED_TICKLESS
105
+ /* Increment the nested watchdog timer count to handle cases where wd_start
106
+ * is called in the watchdog callback functions.
107
+ */
108
+
109
+ g_wdtimernested ++ ;
110
+ #endif
111
+
96
112
/* Process the watchdog at the head of the list as well as any
97
113
* other watchdogs that became ready to run at this time
98
114
*/
@@ -122,6 +138,12 @@ static inline_function void wd_expiration(clock_t ticks)
122
138
up_setpicbase (wdog -> picbase );
123
139
CALL_FUNC (func , wdog -> arg );
124
140
}
141
+
142
+ #ifdef CONFIG_SCHED_TICKLESS
143
+ /* Decrement the nested watchdog timer count */
144
+
145
+ g_wdtimernested -- ;
146
+ #endif
125
147
}
126
148
127
149
/****************************************************************************
Original file line number Diff line number Diff line change @@ -63,10 +63,6 @@ extern "C"
63
63
64
64
extern struct list_node g_wdactivelist ;
65
65
66
- #ifdef CONFIG_SCHED_TICKLESS
67
- extern unsigned int g_wdtimernested ;
68
- #endif
69
-
70
66
/****************************************************************************
71
67
* Public Function Prototypes
72
68
****************************************************************************/
You can’t perform that action at this time.
0 commit comments