replace ad hoc driver loading with a proper driver manager, new DDK, new PnP manager with device matching, asynchronous startup, resource ownership and removal, add shared PCI capability helpers, replace typed, rigid services with a proper service manager, implement proper system shutdown and restart, shutting down unloads drivers and shuts down services, add simple power button, remove heavyweight boot self-tests and SMP stress runs, add monotonic timestamps to kernel debug output, fruitless USB and PS/2 fixes, make test builds opt in.
This commit is contained in:
1 parent
c0ad63c27f
commit
d36f19509c
160 files changed
+6563
-7366
No files matched your search
@@ -29,6 +29,7 @@ int main(void) {
|
||||
NTL_CONSOLE_INFO console;
|
||||
SYS_MEMORY_STATUS mem;
|
||||
char metricsBuf[128];
|
||||
size_t previousLength = 0;
|
||||
|
||||
while (true) {
|
||||
if (NtlConsoleQueryInfo(SYS_HANDLE_INVALID, &console) == NTLSTATUS_SUCCESS &&
|
||||
@@ -52,22 +53,22 @@ int main(void) {
|
||||
strcat(metricsBuf, "K ]");
|
||||
|
||||
size_t textLen = strlen(metricsBuf);
|
||||
// Erase any trailing characters left by a longer previous sample.
|
||||
if (previousLength > textLen && previousLength < sizeof(metricsBuf)) {
|
||||
memset(metricsBuf + textLen, ' ', previousLength - textLen);
|
||||
textLen = previousLength;
|
||||
}
|
||||
int targetX = columns - (int)textLen;
|
||||
int targetY = 0;
|
||||
|
||||
if (targetX >= 0) {
|
||||
size_t written = 0;
|
||||
|
||||
// Loop through the string and use the console's dedicated text filling API
|
||||
// This utilizes the console's native font configuration instead of drawing raw screen bits
|
||||
for (size_t i = 0; i < textLen; i++) {
|
||||
(void)NtlConsoleFillCharacter(SYS_HANDLE_INVALID, metricsBuf[i],
|
||||
targetX + (int)i, targetY, 1, &written);
|
||||
}
|
||||
if (NtlConsoleWriteAt(SYS_HANDLE_INVALID, targetX, 0,
|
||||
metricsBuf, textLen, &written) == NTLSTATUS_SUCCESS &&
|
||||
written == textLen)
|
||||
previousLength = textLen;
|
||||
}
|
||||
}
|
||||
|
||||
SysSleep(500);
|
||||
SysSleep(2000);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
Reference in new issue
Block a user