@@ -109,13 +109,15 @@ static inline void nxsched_cpu_scheduler(int cpu)
109
109
#if CONFIG_RR_INTERVAL > 0 || defined(CONFIG_SCHED_SPORADIC )
110
110
static inline void nxsched_process_scheduler (void )
111
111
{
112
- #ifdef CONFIG_SMP
113
112
irqstate_t flags ;
114
113
int i ;
115
114
116
- /* If we are running on a single CPU architecture, then we know interrupts
117
- * are disabled and there is no need to explicitly call
118
- * enter_critical_section(). However, in the SMP case,
115
+ /* Single CPU case:
116
+ * For nested interrupts, higher IRQs may interrupt nxsched_cpu_scheduler()
117
+ * but nxsched_cpu_scheduler() requires that interrupts be disabled.
118
+ * We are in ISR context, no meaning we are disabled the interrupts.
119
+ *
120
+ * SMP case:
119
121
* enter_critical_section() does much more than just disable interrupts on
120
122
* the local CPU; it also manages spinlocks to assure the stability of the
121
123
* TCB that we are manipulating.
@@ -131,53 +133,11 @@ static inline void nxsched_process_scheduler(void)
131
133
}
132
134
133
135
leave_critical_section (flags );
134
-
135
- #else
136
- /* Perform scheduler operations on the single CPUs */
137
-
138
- nxsched_cpu_scheduler (0 );
139
- #endif
140
136
}
141
137
#else
142
138
# define nxsched_process_scheduler ()
143
139
#endif
144
140
145
- /****************************************************************************
146
- * Name: nxsched_process_wdtimer
147
- *
148
- * Description:
149
- * Wdog timer process, should with critical_section when SMP mode.
150
- *
151
- * Input Parameters:
152
- * None
153
- *
154
- * Returned Value:
155
- * None
156
- *
157
- ****************************************************************************/
158
-
159
- #ifdef CONFIG_SMP
160
- static inline void nxsched_process_wdtimer (clock_t ticks )
161
- {
162
- irqstate_t flags ;
163
-
164
- /* We are in an interrupt handler and, as a consequence, interrupts are
165
- * disabled. But in the SMP case, interrupts MAY be disabled only on
166
- * the local CPU since most architectures do not permit disabling
167
- * interrupts on other CPUS.
168
- *
169
- * Hence, we must follow rules for critical sections even here in the
170
- * SMP case.
171
- */
172
-
173
- flags = enter_critical_section ();
174
- wd_timer (ticks );
175
- leave_critical_section (flags );
176
- }
177
- #else
178
- # define nxsched_process_wdtimer (ticks ) wd_timer(ticks)
179
- #endif
180
-
181
141
/****************************************************************************
182
142
* Public Functions
183
143
****************************************************************************/
@@ -236,7 +196,7 @@ void nxsched_process_timer(void)
236
196
237
197
/* Process watchdogs */
238
198
239
- nxsched_process_wdtimer (clock_systime_ticks ());
199
+ wd_timer (clock_systime_ticks ());
240
200
241
201
#ifdef CONFIG_SYSTEMTICK_HOOK
242
202
/* Call out to a user-provided function in order to perform board-specific,
0 commit comments