kernel: DPC support

This commit is contained in:
Matheus
2023-06-25 21:00:14 -03:00
parent 3a85c64b80
commit 99a7eccbe4
5 changed files with 101 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
#ifndef _DPC_H
#define _DPC_H
#include <arch/context.h>
#include <stdbool.h>
typedef void * dpcarg_t;
typedef void (*dpcfn_t)(context_t *, dpcarg_t);
typedef struct _dpc_t {
struct _dpc_t *next;
struct _dpc_t *prev;
bool enqueued;
dpcfn_t fn;
dpcarg_t arg;
} dpc_t;
void dpc_enqueue(dpc_t *dpc, dpcfn_t, dpcarg_t);
void dpc_dequeue(dpc_t *dpc);
void dpc_init();
#endif