summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFuwn <[email protected]>2022-01-03 14:41:21 -0800
committerFuwn <[email protected]>2022-01-03 14:41:21 -0800
commite080c951f0d10842dfedb43dd527d1d509ffdeaa (patch)
tree8d4996643f5a4ab947abd6403d81a56d9b1cef84
parentfix(winioctl): impl Into to impl From (diff)
downloaddriver-e080c951f0d10842dfedb43dd527d1d509ffdeaa.tar.xz
driver-e080c951f0d10842dfedb43dd527d1d509ffdeaa.zip
fix(windows-kernel-rs): don't waste cpu cycles :)
-rw-r--r--crates/windows-kernel-rs/Cargo.toml1
-rw-r--r--crates/windows-kernel-rs/src/allocator.rs2
2 files changed, 2 insertions, 1 deletions
diff --git a/crates/windows-kernel-rs/Cargo.toml b/crates/windows-kernel-rs/Cargo.toml
index e8f4660..b361135 100644
--- a/crates/windows-kernel-rs/Cargo.toml
+++ b/crates/windows-kernel-rs/Cargo.toml
@@ -22,3 +22,4 @@ cty = "0.2"
lazy_static = { version = "1.4", features = ["spin_no_std"] }
widestring = { version = "0.4", default-features = false, features = ["alloc"]}
windows-kernel-sys = { path = "../windows-kernel-sys" }
+x86_64 = "0.14.7"
diff --git a/crates/windows-kernel-rs/src/allocator.rs b/crates/windows-kernel-rs/src/allocator.rs
index 2cb1515..9c9f996 100644
--- a/crates/windows-kernel-rs/src/allocator.rs
+++ b/crates/windows-kernel-rs/src/allocator.rs
@@ -15,7 +15,7 @@ use crate::version::VersionInfo;
/// See issue #52191.
#[alloc_error_handler]
-fn alloc_error(_: Layout) -> ! { loop {} } // core::panic!()
+fn alloc_error(_: Layout) -> ! { loop { x86_64::instructions::hlt() } }
lazy_static! {
/// The version of Microsoft Windows that is currently running. This is used by