mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-27 20:58:22 +00:00
kernel: DPC support
This commit is contained in:
@@ -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
|
||||
@@ -15,6 +15,7 @@
|
||||
#define IPL_MAX 0
|
||||
#define IPL_TIMER 1
|
||||
#define IPL_KEYBOARD 2
|
||||
#define IPL_DPC 900
|
||||
#define IPL_NORMAL 1000
|
||||
|
||||
struct _isr_t;
|
||||
|
||||
Reference in New Issue
Block a user