dpc: fix possible race

This commit is contained in:
Matheus
2024-08-14 16:39:27 -03:00
parent 227b390f30
commit bf7851b352
+2 -1
View File
@@ -28,12 +28,13 @@ static void isrfn(isr_t *self, context_t *context) {
while (_cpu()->dpcqueue) {
dpc_t *dpc = _cpu()->dpcqueue;
remove(dpc);
dpcarg_t arg = dpc->arg;
__assert(dpc->enqueued);
dpc->enqueued = false;
interrupt_set(true);
dpc->fn(context, dpc->arg);
dpc->fn(context, arg);
interrupt_set(false);
}
}