diff --git a/kernel-src/sys/dpc.c b/kernel-src/sys/dpc.c index 59484b67..048d38dc 100644 --- a/kernel-src/sys/dpc.c +++ b/kernel-src/sys/dpc.c @@ -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); } }