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

@@ -72,15 +72,19 @@ static uint32_t open_test_file(uint32_t* out, const char** pathOut) {
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;
if (pathOut) *pathOut = paths[i];
return SYS_STATUS_SUCCESS;
return STATUS_SUCCESS;
}
}
return SYS_STATUS_NOT_FOUND;
return STATUS_NOT_FOUND;
}
int main(void) {
@@ -90,14 +94,16 @@ int main(void) {
SYS_FILE_CACHE_STATS afterFault;
SYS_FILE_CACHE_STATS afterRead;
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;
const char* path = 0;
s = open_test_file(&file, &path);
if (s != SYS_STATUS_SUCCESS) fail_status("open test file", s);
if (s != STATUS_SUCCESS) fail_status("open test file", s);
uint64_t fileSize = SysGetFileSize(file);
uint64_t fileSize = 0;
s = SysGetFileSize(file, &fileSize);
if (s != STATUS_SUCCESS) fail_status("get file size", s);
if (fileSize < 4096) fail("test file too small");
size_t mapSize = (fileSize < TEST_SIZE) ? (size_t)fileSize : TEST_SIZE;
@@ -109,12 +115,12 @@ int main(void) {
uint32_t mapping = 0;
s = SysCreateFileMapping(file, SYS_VM_READ, SYS_MAP_FLAG_NONE, mapSize, &mapping);
if (s != SYS_STATUS_SUCCESS) fail_status("create mapping", s);
if (s != STATUS_SUCCESS) fail_status("create mapping", s);
void* base = 0;
s = SysMapFile(mapping, 0, mapSize, 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;
@@ -123,14 +129,14 @@ int main(void) {
(void)view[mapSize - 1];
s = query_cache(&afterFault);
if (s != SYS_STATUS_SUCCESS) fail_status("query after mmap faults", s);
if (s != STATUS_SUCCESS) fail_status("query after mmap faults", s);
if (afterFault.Loads <= before.Loads) {
SysFreeVm(base);
fail("mmap faults did not populate file cache");
}
s = SysSeekFile(file, 0);
if (s != SYS_STATUS_SUCCESS) {
if (s != STATUS_SUCCESS) {
SysFreeVm(base);
fail_status("seek", s);
}
@@ -139,7 +145,7 @@ int main(void) {
memset(gReadback, 0xCC, sizeof(gReadback));
SYS_FILE_IO_REQUEST readReq = SysMakeFileIoRequest(file, gReadback, mapSize, &got);
s = SysReadFile(&readReq);
if (s != SYS_STATUS_SUCCESS) {
if (s != STATUS_SUCCESS) {
SysFreeVm(base);
fail_status("read", s);
}
@@ -153,7 +159,7 @@ int main(void) {
}
s = query_cache(&afterRead);
if (s != SYS_STATUS_SUCCESS) {
if (s != STATUS_SUCCESS) {
SysFreeVm(base);
fail_status("query after read", s);
}