xref: /DragonOS/kernel/src/arch/x86_64/rand.rs (revision 4fda81ce81939d83b74c8042d6fb4223deff3685)
1 use core::arch::x86_64::_rdtsc;
2 
rand() -> usize3 pub fn rand() -> usize {
4     return unsafe { (_rdtsc() * _rdtsc() + 998244353_u64 * _rdtsc()) as usize };
5 }
6