From bb555d0620b09ac3dca59ebb3e1b6d42eaf251ee Mon Sep 17 00:00:00 2001 From: wnstngs <64602598+wnstngs@users.noreply.github.com> Date: Wed, 7 Oct 2026 21:35:51 +0300 Subject: [PATCH] dpc: make dpc queues FIFO --- kernel-src/sys/dpc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/kernel-src/sys/dpc.c b/kernel-src/sys/dpc.c index 1b7835f1..3f846434 100644 --- a/kernel-src/sys/dpc.c +++ b/kernel-src/sys/dpc.c @@ -5,8 +5,7 @@ static void isrfn(isr_t *self, context_t *context) { - list_node_t *node; - while ((node = list_pop_front(¤t_cpu()->dpcqueue)) != NULL) { + list_drain_front (¤t_cpu()->dpcqueue, node) { dpc_t *dpc = (dpc_t *)node; dpcarg_t arg = dpc->arg; @@ -34,7 +33,7 @@ void dpc_enqueue(dpc_t *dpc, dpcarg_t arg) { dpc->arg = arg; dpc->enqueued = true; - list_push_front(¤t_cpu()->dpcqueue, &dpc->list_node); + list_push_back(¤t_cpu()->dpcqueue, &dpc->list_node); interrupt_raise(current_cpu()->dpcisr); cleanup: