threads: small code cleaning
@@ -1158,22 +1158,17 @@ void proc_threadWakeupYield(thread_t **queue)
void proc_threadBroadcastYield(thread_t **queue)
{
- int yield = 0;
-
hal_spinlockSet(&threads_common.spinlock);
if (*queue != (void *)-1 && *queue != NULL) {
- yield = 1;
while (*queue != NULL)
_proc_threadWakeup(queue);
+
+ hal_cpuReschedule(&threads_common.spinlock);
}
else {
*queue = (void *)(-1);
- }
-
- if (yield)
- hal_cpuReschedule(&threads_common.spinlock);
- else
hal_spinlockClear(&threads_common.spinlock);
+ }
return;
}
