Skip to content

Commit b0936c3

Browse files
committed
Get rid of deprecated stuff
1 parent 24fc1e4 commit b0936c3

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/ntexapi.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
use core::mem::uninitialized;
1+
use core::mem::MaybeUninit;
22
#[cfg(any(target_arch = "x86_64", target_arch = "aarch64"))]
33
use core::ptr::addr_of;
44
use core::ptr::read_volatile;
55
#[cfg(target_arch = "x86")]
6-
use core::sync::atomic::spin_loop_hint;
6+
use core::hint::spin_loop;
77
use crate::ntapi_base::{CLIENT_ID, KPRIORITY, KSYSTEM_TIME, PRTL_ATOM, RTL_ATOM};
88
use crate::ntioapi::{BUS_DATA_TYPE, FILE_IO_COMPLETION_INFORMATION, INTERFACE_TYPE};
99
use crate::ntkeapi::{KPROFILE_SOURCE, KTHREAD_STATE, KWAIT_REASON};
@@ -2780,7 +2780,7 @@ pub type PKUSER_SHARED_DATA = *mut KUSER_SHARED_DATA;
27802780
pub const USER_SHARED_DATA: *const KUSER_SHARED_DATA = 0x7ffe0000 as *const _;
27812781
#[inline]
27822782
pub unsafe fn NtGetTickCount64() -> ULONGLONG {
2783-
let mut tick_count: ULARGE_INTEGER = uninitialized();
2783+
let mut tick_count: ULARGE_INTEGER = MaybeUninit::uninit().assume_init();
27842784
#[cfg(any(target_arch = "x86_64", target_arch = "aarch64"))] {
27852785
*tick_count.QuadPart_mut() = read_volatile(addr_of!((*USER_SHARED_DATA).u.TickCountQuad));
27862786
}
@@ -2794,7 +2794,7 @@ pub unsafe fn NtGetTickCount64() -> ULONGLONG {
27942794
{
27952795
break;
27962796
}
2797-
spin_loop_hint();
2797+
spin_loop();
27982798
}
27992799
}
28002800
(UInt32x32To64(tick_count.s().LowPart, (*USER_SHARED_DATA).TickCountMultiplier) >> 24)
@@ -2810,7 +2810,7 @@ pub unsafe fn NtGetTickCount() -> ULONG {
28102810
* (*USER_SHARED_DATA).TickCountMultiplier as u64) >> 24) as u32
28112811
}
28122812
#[cfg(target_arch = "x86")] {
2813-
let mut tick_count: ULARGE_INTEGER = uninitialized();
2813+
let mut tick_count: ULARGE_INTEGER = MaybeUninit::uninit().assume_init();
28142814
loop {
28152815
tick_count.s_mut().HighPart = read_volatile(&(*USER_SHARED_DATA).u.TickCount.High1Time)
28162816
as u32;
@@ -2820,7 +2820,7 @@ pub unsafe fn NtGetTickCount() -> ULONG {
28202820
{
28212821
break;
28222822
}
2823-
spin_loop_hint();
2823+
spin_loop();
28242824
}
28252825
((UInt32x32To64(tick_count.s().LowPart, (*USER_SHARED_DATA).TickCountMultiplier) >> 24)
28262826
+ UInt32x32To64(

0 commit comments

Comments
 (0)