fn systemBasicInformation(t: *Threaded) ?*const windows.SYSTEM.BASIC_INFORMATION t: *Threaded4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133fn systemBasicInformation(t: *Threaded) ?*const windows.SYSTEM.BASIC_INFORMATION {
if (!t.system_basic_information.initialized.load(.acquire)) {
mutexLock(&t.mutex);
defer mutexUnlock(&t.mutex);
switch (windows.ntdll.NtQuerySystemInformation(
.Basic,
&t.system_basic_information.buffer,
@sizeOf(windows.SYSTEM.BASIC_INFORMATION),
null,
)) {
.SUCCESS => {},
else => return null,
}
t.system_basic_information.initialized.store(true, .release);
}
return &t.system_basic_information.buffer;
}