Initial Deferred Procedure Call (DPC) support
All checks were successful
ci/woodpecker/push/build Pipeline was successful
All checks were successful
ci/woodpecker/push/build Pipeline was successful
This commit is contained in:
parent
fd8eec1d86
commit
8f653c47dc
@ -75,6 +75,15 @@ typedef enum _KAPC_ENVIRONMENT
|
||||
InsertApcEnvironment
|
||||
} KAPC_ENVIRONMENT, *PKAPC_ENVIRONMENT;
|
||||
|
||||
/* DPC importance enumeration list */
|
||||
typedef enum _KDPC_IMPORTANCE
|
||||
{
|
||||
LowImportance,
|
||||
MediumImportance,
|
||||
HighImportance,
|
||||
MediumHighImportance
|
||||
} KDPC_IMPORTANCE, *PKDPC_IMPORTANCE;
|
||||
|
||||
/* Kernel objects */
|
||||
typedef enum _KOBJECTS
|
||||
{
|
||||
|
@ -39,6 +39,7 @@ typedef enum _EFI_UART_PARITY_TYPE EFI_UART_PARITY_TYPE, *PEFI_UART_PARITY_TYPE;
|
||||
typedef enum _EFI_UART_STOP_BITS_TYPE EFI_UART_STOP_BITS_TYPE, *PEFI_UART_STOP_BITS_TYPE;
|
||||
typedef enum _EFI_UNIVERSA_GRAPHICS_BLT_OPERATION EFI_UNIVERSA_GRAPHICS_BLT_OPERATION, *PEFI_UNIVERSA_GRAPHICS_BLT_OPERATION;
|
||||
typedef enum _KAPC_ENVIRONMENT KAPC_ENVIRONMENT, *PKAPC_ENVIRONMENT;
|
||||
typedef enum _KDPC_IMPORTANCE KDPC_IMPORTANCE, *PKDPC_IMPORTANCE;
|
||||
typedef enum _KOBJECTS KOBJECTS, *PKOBJECTS;
|
||||
typedef enum _KPROCESS_STATE KPROCESS_STATE, *PKPROCESS_STATE;
|
||||
typedef enum _KTHREAD_STATE KTHREAD_STATE, *PKTHREAD_STATE;
|
||||
|
@ -17,6 +17,7 @@ list(APPEND XTOSKRNL_SOURCE
|
||||
${XTOSKRNL_SOURCE_DIR}/hl/globals.c
|
||||
${XTOSKRNL_SOURCE_DIR}/hl/${ARCH}/ioport.c
|
||||
${XTOSKRNL_SOURCE_DIR}/ke/apc.c
|
||||
${XTOSKRNL_SOURCE_DIR}/ke/dpc.c
|
||||
${XTOSKRNL_SOURCE_DIR}/ke/globals.c
|
||||
${XTOSKRNL_SOURCE_DIR}/ke/kprocess.c
|
||||
${XTOSKRNL_SOURCE_DIR}/ke/krnlinit.c
|
||||
|
60
xtoskrnl/ke/dpc.c
Normal file
60
xtoskrnl/ke/dpc.c
Normal file
@ -0,0 +1,60 @@
|
||||
/**
|
||||
* PROJECT: ExectOS
|
||||
* COPYRIGHT: See COPYING.md in the top level directory
|
||||
* FILE: xtoskrnl/ke/dpc.c
|
||||
* DESCRIPTION: Deferred Procedure Call (DPC) support
|
||||
* DEVELOPERS: Rafal Kupiec <belliash@codingworkshop.eu.org>
|
||||
*/
|
||||
|
||||
#include <xtos.h>
|
||||
|
||||
|
||||
/**
|
||||
* Initializes Deferred Procedure Call (DPC) object.
|
||||
*
|
||||
* @param Dpc
|
||||
* Supplies a pointer to the DPC being initialized.
|
||||
*
|
||||
* @param DpcRoutine
|
||||
* Supplies a pointer to the DPC routine being called on object removal.
|
||||
*
|
||||
* @param DpcContext
|
||||
* Supplies a pointer to memory area containing context data for DPC routine.
|
||||
*
|
||||
* @return This routine does not return any value.
|
||||
*
|
||||
* @since NT 3.5
|
||||
*/
|
||||
XTAPI
|
||||
VOID
|
||||
KeInitializeDpc(IN PKDPC Dpc,
|
||||
IN PKDEFERRED_ROUTINE DpcRoutine,
|
||||
IN PVOID DpcContext)
|
||||
{
|
||||
/* Initialize DPC */
|
||||
Dpc->Type = DpcObject;
|
||||
Dpc->Number = 0;
|
||||
Dpc->Importance = MediumImportance;
|
||||
|
||||
/* Initialize DPC routine and context data */
|
||||
Dpc->DeferredContext = DpcContext;
|
||||
Dpc->DeferredRoutine = DpcRoutine;
|
||||
Dpc->DpcData = NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retires the expired DPC objects found in the DPC list.
|
||||
*
|
||||
* @param Prcb
|
||||
* Supplies apointer to the Prcessor Control Block (PRCB).
|
||||
*
|
||||
* @return This routine does not return any value.
|
||||
*
|
||||
* @since XT 1.0
|
||||
*/
|
||||
XTFASTCALL
|
||||
VOID
|
||||
KepRetireDpcList(IN PKPROCESSOR_CONTROL_BLOCK Prcb)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
}
|
Loading…
Reference in New Issue
Block a user