ptos: hal: Add high-level interrupt interface groundwork

Signed-off-by: Chloe M. <chloe@mensia.org>
This commit is contained in:
2026-07-12 02:58:45 +00:00
parent 70de440326
commit 41706bf188
+43
View File
@@ -0,0 +1,43 @@
/*
* Copyright (c) 2026, Chloe M.
* Provided under the BSD-3 clause.
*
* Description: High-level interrupt management
* Author: Chloe M.
*/
#ifndef _HAL_INTR_H_
#define _HAL_INTR_H_ 1
#include <ptdef.h>
/*
* Represents value interrupt request levels that can be set within
* the machine specific task priority store.
*/
#define IRQL_PASSIVE 0
#define IRQL_APC 1
#define IRQL_DISPATCH 2
#define IRQL_DEV_IRQ 3
#define IRQL_HIGH 4
/* Interrupt request level type */
typedef UCHAR IRQL;
/*
* Represents an interrupt handler
*
* @Handler: Actual in-driver handler [@Data: driver specific data]
* @Irql: IRQL of this handler context
* @Present: If true, entry is present
*
* XXX: This structured must be consistently ordered as it is
* read from assembly, always add to the bottom !!
*/
typedef struct _INTR_HANDLER {
PT_STATUS(*Handler)(VOID *Data);
IRQL Irql;
BOOLEAN Present;
} INTR_HANDLER;
#endif /* !_HAL_INTR_H_ */