implement user mode catchable exceptions, refactor system status codes to use NTLSTATUS_ prefix, update build scripts to use shared literal macros for linker arguments, update named queue lifetime cleanup to include KeNamedQueueUnpublishHandle.
This commit is contained in:
1 parent
1f5477cf66
commit
b7fcfce6f7
140 files changed
+7649
-3943
No files matched your search
@@ -335,7 +335,7 @@ void KeTimeInitialize(const BOOT_INFO* bootInfo, const HAL_API* hal) {
|
||||
} else {
|
||||
HAL_RTC_TIME rtc;
|
||||
memset(&rtc, 0, sizeof(rtc));
|
||||
if (hal && hal->Rtc.QueryTime && hal->Rtc.QueryTime(&rtc) == STATUS_SUCCESS &&
|
||||
if (hal && hal->Rtc.QueryTime && hal->Rtc.QueryTime(&rtc) == NTLSTATUS_SUCCESS &&
|
||||
(rtc.Flags & HAL_RTC_TIME_FLAG_VALID) &&
|
||||
KiValidCalendar(rtc.Year, rtc.Month, rtc.Day, rtc.Hour, rtc.Minute,
|
||||
rtc.Second, rtc.Nanosecond)) {
|
||||
@@ -360,7 +360,7 @@ void KeTimeInitialize(const BOOT_INFO* bootInfo, const HAL_API* hal) {
|
||||
KiRebaseUtcFromSource();
|
||||
|
||||
SYS_SYSTEM_TIME now;
|
||||
if (KeQuerySystemTime(&now) == STATUS_SUCCESS) {
|
||||
if (KeQuerySystemTime(&now) == NTLSTATUS_SUCCESS) {
|
||||
DbgPrint("time: initialized %04u-%02u-%02u %02u:%02u:%02u.%03u flags=0x%x tz=%d hw=%s epoch=%llu\n",
|
||||
now.Year, now.Month, now.Day, now.Hour, now.Minute, now.Second,
|
||||
now.Millisecond, now.Flags, now.TimeZoneMinutes,
|
||||
@@ -466,7 +466,7 @@ KSTATUS KeTimeReloadSettings(void) {
|
||||
KiRebaseUtcFromSource();
|
||||
|
||||
SYS_SYSTEM_TIME now;
|
||||
if (KeQuerySystemTime(&now) == STATUS_SUCCESS) {
|
||||
if (KeQuerySystemTime(&now) == NTLSTATUS_SUCCESS) {
|
||||
DbgPrint("time: settings timezone=%d dst=%s hw=%s now=%04u-%02u-%02u %02u:%02u:%02u flags=0x%x epoch=%llu\n",
|
||||
now.TimeZoneMinutes,
|
||||
(now.Flags & SYS_TIME_FLAG_DAYLIGHT) ? "on" : "off",
|
||||
@@ -474,12 +474,12 @@ KSTATUS KeTimeReloadSettings(void) {
|
||||
now.Year, now.Month, now.Day, now.Hour, now.Minute, now.Second,
|
||||
now.Flags, now.EpochSeconds);
|
||||
}
|
||||
return STATUS_SUCCESS;
|
||||
return NTLSTATUS_SUCCESS;
|
||||
}
|
||||
|
||||
// Returns system Time.
|
||||
__declspec(dllexport) KSTATUS KeQuerySystemTime(SYS_SYSTEM_TIME* outTime) {
|
||||
if (!outTime) return STATUS_INVALID_PARAMETER;
|
||||
if (!outTime) return NTLSTATUS_INVALID_PARAMETER;
|
||||
|
||||
uint64_t nowTick = (gTimeHal && gTimeHal->Timer.QueryTicks)
|
||||
? gTimeHal->Timer.QueryTicks()
|
||||
@@ -516,13 +516,13 @@ __declspec(dllexport) KSTATUS KeQuerySystemTime(SYS_SYSTEM_TIME* outTime) {
|
||||
t.TickMicroseconds = nowTick;
|
||||
|
||||
*outTime = t;
|
||||
return STATUS_SUCCESS;
|
||||
return NTLSTATUS_SUCCESS;
|
||||
}
|
||||
|
||||
// Returns unix Time Seconds.
|
||||
__declspec(dllexport) uint64_t KeQueryUnixTimeSeconds(void) {
|
||||
SYS_SYSTEM_TIME t;
|
||||
if (KeQuerySystemTime(&t) != STATUS_SUCCESS)
|
||||
if (KeQuerySystemTime(&t) != NTLSTATUS_SUCCESS)
|
||||
return 0;
|
||||
return t.EpochSeconds;
|
||||
}
|
||||
Reference in new issue
Block a user