add ntfs.sys standalone driver target, change default usb vhd layout formatting to ntfs, implement Fat32CreateDir for directory creation support in the fat32 file system driver, add a dedicated HAL serial output endpoint for COM1 writes in hal_serial.c and subscribe serial to HAL text streams, introduce waitable kernel timers with KeTimerCreate, KeTimerSet, and KeTimerCancel alongside spinlock-protected global timer list initialization and scheduler tick tracking, implement SyscallWriteFileAsync system call for asynchronous non-blocking file writes, refactor NetSocketConnect and NetSocketSendTo to use generic SYS_SOCKET_ADDRESS_K structures instead of being hardcoded to IPv4, update gethostbyname and DNS name resolution to support IPv6 parsing via ResolveNameFamily, update tcpserve.exe with -4 and -6 command-line flags to accept and display IPv6 addresses, append size and version headers to all kernel telemetry and statistics structures including SYS_PMM_STATS, SYS_CPU_STATS, and SYS_SCHEDULER_STATS, update winmm timeGetTime to look up high-resolution hardware frequencies via SysGetTickFrequency, integrate 14 native smoke test applications.

This commit is contained in:
maksw committed 2026-06-26 15:18:48 +02:00
1 parent 2c4a68a75f
commit ed3d065abd
156 files changed
+10509 -2643

No files matched your search

+18 -14
View File
@@ -66,15 +66,19 @@ static uint32_t open_self(uint32_t* out) {
for (size_t i = 0; i < sizeof(paths) / sizeof(paths[0]); ++i) {
uint32_t h = 0;
SYS_PATH_HANDLE_REQUEST req = { SysSvFromCstr(paths[i]), &h };
SYS_OPEN_FILE_REQUEST req = SysMakeOpenFileRequest(SysSvFromCstr(paths[i]),
SYS_FILE_ACCESS_READ | SYS_FILE_ACCESS_QUERY,
SYS_FILE_OPEN_EXISTING,
SYS_FILE_FLAG_NONE,
&h);
uint32_t s = SysOpenFile(&req);
if (s == SYS_STATUS_SUCCESS) {
if (s == STATUS_SUCCESS) {
*out = h;
print("pcache_smoke: using "); print(paths[i]); print("\n");
return SYS_STATUS_SUCCESS;
return STATUS_SUCCESS;
}
}
return SYS_STATUS_NOT_FOUND;
return STATUS_NOT_FOUND;
}
int main(void) {
@@ -82,52 +86,52 @@ int main(void) {
SYS_FILE_CACHE_STATS before, afterFirst, afterSecond, afterMap;
uint32_t s = query_cache(&before);
if (s != SYS_STATUS_SUCCESS) fail_status("query initial stats", s);
if (s != STATUS_SUCCESS) fail_status("query initial stats", s);
uint32_t file = 0;
s = open_self(&file);
if (s != SYS_STATUS_SUCCESS) fail_status("open test file", s);
if (s != STATUS_SUCCESS) fail_status("open test file", s);
size_t gotA = 0;
memset(gA, 0xA5, sizeof(gA));
SYS_FILE_IO_REQUEST readReqA = SysMakeFileIoRequest(file, gA, sizeof(gA), &gotA);
s = SysReadFile(&readReqA);
if (s != SYS_STATUS_SUCCESS) fail_status("first read", s);
if (s != STATUS_SUCCESS) fail_status("first read", s);
if (gotA < 4096) fail("first read too short");
print("pcache_smoke: first read OK\n");
s = query_cache(&afterFirst);
if (s != SYS_STATUS_SUCCESS) fail_status("query after first read", s);
if (s != STATUS_SUCCESS) fail_status("query after first read", s);
if (afterFirst.Loads <= before.Loads)
fail("first read did not load file-cache pages");
s = SysSeekFile(file, 0);
if (s != SYS_STATUS_SUCCESS) fail_status("seek", s);
if (s != STATUS_SUCCESS) fail_status("seek", s);
size_t gotB = 0;
memset(gB, 0x5A, sizeof(gB));
SYS_FILE_IO_REQUEST readReqB = SysMakeFileIoRequest(file, gB, sizeof(gB), &gotB);
s = SysReadFile(&readReqB);
if (s != SYS_STATUS_SUCCESS) fail_status("second read", s);
if (s != STATUS_SUCCESS) fail_status("second read", s);
if (gotB != gotA) fail("second read length mismatch");
if (memcmp(gA, gB, gotA) != 0) fail("second read data mismatch");
print("pcache_smoke: second read OK\n");
s = query_cache(&afterSecond);
if (s != SYS_STATUS_SUCCESS) fail_status("query after second read", s);
if (s != STATUS_SUCCESS) fail_status("query after second read", s);
if (afterSecond.Hits <= afterFirst.Hits)
fail("second read did not hit file cache");
uint32_t mapping = 0;
s = SysCreateFileMapping(file, SYS_VM_READ, SYS_MAP_FLAG_NONE, sizeof(gA), &mapping);
if (s != SYS_STATUS_SUCCESS) fail_status("create mapping", s);
if (s != STATUS_SUCCESS) fail_status("create mapping", s);
SysCloseHandle(file);
file = 0;
void* base = 0;
s = SysMapFile(mapping, 0, sizeof(gA), SYS_MAP_ACCESS_READ, SYS_MAP_FLAG_NONE, &base);
SysCloseHandle(mapping);
if (s != SYS_STATUS_SUCCESS) fail_status("map file", s);
if (s != STATUS_SUCCESS) fail_status("map file", s);
if (!base) fail("map returned null");
volatile uint8_t* view = (volatile uint8_t*)base;
@@ -141,7 +145,7 @@ int main(void) {
}
s = query_cache(&afterMap);
if (s != SYS_STATUS_SUCCESS) fail_status("query after map", s);
if (s != STATUS_SUCCESS) fail_status("query after map", s);
if (afterMap.Hits <= afterSecond.Hits)
fail("mmap faults did not hit already cached pages");