aboutsummaryrefslogtreecommitdiff
path: root/src/irql.rs
diff options
context:
space:
mode:
authorpravic <[email protected]>2016-04-12 16:39:37 +0300
committerpravic <[email protected]>2016-04-12 16:39:37 +0300
commit28ff216899e95a6a9756bcbe580f28ed8ce61228 (patch)
treebbf00e3c5f3b440db5ddb3f86b6d3a893349cee0 /src/irql.rs
parentgit ignore (diff)
downloadwinapi-kmd-rs-28ff216899e95a6a9756bcbe580f28ed8ce61228.tar.xz
winapi-kmd-rs-28ff216899e95a6a9756bcbe580f28ed8ce61228.zip
Windows Kernel-Mode library
Diffstat (limited to 'src/irql.rs')
-rw-r--r--src/irql.rs61
1 files changed, 61 insertions, 0 deletions
diff --git a/src/irql.rs b/src/irql.rs
new file mode 100644
index 0000000..e6e60bb
--- /dev/null
+++ b/src/irql.rs
@@ -0,0 +1,61 @@
+//! Interrupt Request Level (IRQL).
+
+/// IRQL type.
+pub type KIRQL = u8;
+
+/// Passive release level, no interrupt vectors are masked.
+pub const PASSIVE_LEVEL: KIRQL = 0;
+/// The lowest IRQL level, no interrupt vectors are masked.
+pub const LOW_LEVEL: KIRQL = 0;
+/// APC interrupt level.
+pub const APC_LEVEL: KIRQL = 1;
+/// Dispatcher level
+pub const DISPATCH_LEVEL: KIRQL = 2;
+
+/// Timer used for profiling.
+#[cfg(target_arch = "x86")]
+pub const PROFILE_LEVEL: KIRQL = 27;
+
+/// Interval clock level.
+#[cfg(target_arch = "x86")]
+pub const CLOCK_LEVEL: KIRQL = 28;
+
+/// Interprocessor interrupt level.
+#[cfg(target_arch = "x86")]
+pub const IPI_LEVEL: KIRQL = 29;
+
+/// Power failure level.
+#[cfg(target_arch = "x86")]
+pub const POWER_LEVEL: KIRQL = 30;
+
+/// Highest interrupt level.
+#[cfg(target_arch = "x86")]
+pub const HIGH_LEVEL: KIRQL = 31;
+
+/// Synchronization level.
+#[cfg(target_arch = "x86")]
+pub const SYNCH_LEVEL: KIRQL = 29 - 2;
+
+/// Interval clock level.
+#[cfg(target_arch = "x86_64")]
+pub const CLOCK_LEVEL: KIRQL = 13;
+
+/// Interprocessor interrupt level.
+#[cfg(target_arch = "x86_64")]
+pub const IPI_LEVEL: KIRQL = 14;
+
+/// Power failure level.
+#[cfg(target_arch = "x86_64")]
+pub const POWER_LEVEL: KIRQL = 15;
+
+/// Timer used for profiling.
+#[cfg(target_arch = "x86_64")]
+pub const PROFILE_LEVEL: KIRQL = 16;
+
+/// Highest interrupt level.
+#[cfg(target_arch = "x86_64")]
+pub const HIGH_LEVEL: KIRQL = 17;
+
+/// Synchronization level.
+#[cfg(target_arch = "x86_64")]
+pub const SYNCH_LEVEL: KIRQL = 14- 2;