HyperDbg Debugger
Loading...
Searching...
No Matches
PlatformIrql.c File Reference

Implementation of cross platform APIs for IRQL management. More...

#include "pch.h"

Functions

KIRQL PlatformIrqlRaiseToDpcLevel (VOID)
 Raise the current IRQL to DISPATCH_LEVEL.
VOID PlatformIrqlLower (KIRQL OldIrql)
 Lower the current IRQL to the previously saved value.

Detailed Description

Implementation of cross platform APIs for IRQL management.

Author
Sina Karvandi (sina@.nosp@m.hype.nosp@m.rdbg..nosp@m.org)
Version
0.19
Date
2026-05-09

Function Documentation

◆ PlatformIrqlLower()

VOID PlatformIrqlLower ( KIRQL OldIrql)

Lower the current IRQL to the previously saved value.

Parameters
OldIrqlThe previous IRQL to restore
Returns
VOID
49{
50#if defined(_WIN32) || defined(_WIN64)
51
52 KeLowerIrql(OldIrql);
53
54#elif defined(__linux__)
55
56# error "Not yet implemented"
57
58#else
59
60# error "Unsupported platform"
61
62#endif
63}

◆ PlatformIrqlRaiseToDpcLevel()

KIRQL PlatformIrqlRaiseToDpcLevel ( VOID )

Raise the current IRQL to DISPATCH_LEVEL.

Returns
KIRQL The previous IRQL before the raise
25{
26#if defined(_WIN32) || defined(_WIN64)
27
28 return KeRaiseIrqlToDpcLevel();
29
30#elif defined(__linux__)
31
32# error "Not yet implemented"
33
34#else
35
36# error "Unsupported platform"
37
38#endif
39}