redo boot around an explicit system volume and fixed kernel/HAL images, redo volumes and filesystem paths around capabilities instead of drive numbers and kernel CWD state, add a capability/security model with derived and revocable handles and security contexts, add port IPC and rssrv to manage the userspace resource namespace and publish the system volume, move process, dll and path loading to userspace and add process builder syscalls, init now supervises rssrv and the session process, redo the syscall ABI around request structs and four arguments, add a volume manager and proper partition arrival/removal handling so FAT and NTFS mount dynamically, clean up the HAL/DDK boundary so drivers don't depend on HAL internals, save fpu state properly now, the serial driver doesn't hang on a missing port, fix AHCI startup races, fix timeout accounting, fix shared mmap writeback, more smoke tests

This commit is contained in:
maksw committed 2026-08-20 12:33:17 +02:00
1 parent 4add6789ba
commit f882d339fb
232 files changed
+20934 -8898

No files matched your search

+15 -11
View File
@@ -3,6 +3,7 @@
#include <stddef.h>
#include <string.h>
#include <ntlite/syscall.h>
#include <ntlite/path.h>
#include "posix.h"
#include "posix_fd.h"
#include "posix_path.h"
@@ -61,12 +62,8 @@ __declspec(dllexport) int open(const char* path, int flags, ...) {
else if (flags & O_TRUNC)
disposition = SYS_FILE_TRUNCATE_EXISTING;
SYS_OPEN_FILE_REQUEST req = SysMakeOpenFileRequest(SysSvFromCstr(p),
access,
disposition,
SYS_FILE_FLAG_NONE,
&kh);
uint32_t s = SysOpenFile(&req);
uint32_t s = NtlOpenFile(SysSvFromCstr(p), access, disposition,
SYS_FILE_FLAG_NONE, &kh);
if (s != 0) { errno = PosixStatusToErrno(s); return -1; }
int fd = FdAlloc(pid, type, kh);
@@ -109,7 +106,11 @@ __declspec(dllexport) ssize_t read(int fd, void* buf, size_t count) {
}
case FD_SOCKET: {
size_t got = 0;
uint32_t s = SysRecvSocket(e->KHandle, buf, count, 0, &got);
SYS_SOCKET_RECV_REQUEST request = {
sizeof(SYS_SOCKET_RECV_REQUEST), e->KHandle, 0,
buf, count, &got
};
uint32_t s = SysRecvSocket(&request);
if (s != 0) { errno = PosixStatusToErrno(s); return -1; }
return (ssize_t)got;
}
@@ -128,7 +129,7 @@ __declspec(dllexport) ssize_t write(int fd, const void* buf, size_t count) {
switch (e->Type) {
case FD_CONSOLE_W: {
SYS_WRITE_CONSOLE_REQUEST req = { SysSvFromParts((const char*)buf, count) };
SYS_WRITE_CONSOLE_REQUEST req = { sizeof(SYS_WRITE_CONSOLE_REQUEST), SysSvFromParts((const char*)buf, count) };
SysWriteConsole(&req);
return (ssize_t)count;
}
@@ -144,7 +145,11 @@ __declspec(dllexport) ssize_t write(int fd, const void* buf, size_t count) {
}
case FD_SOCKET: {
size_t sent = 0;
uint32_t s = SysSendSocket(e->KHandle, buf, count, 0, &sent);
SYS_SOCKET_SEND_REQUEST request = {
sizeof(SYS_SOCKET_SEND_REQUEST), e->KHandle, 0,
buf, count, &sent
};
uint32_t s = SysSendSocket(&request);
if (s != 0) { errno = PosixStatusToErrno(s); return -1; }
return (ssize_t)sent;
}
@@ -177,8 +182,7 @@ __declspec(dllexport) int unlink(const char* path) {
return -1;
}
SYS_PATH_REQUEST req = { SysSvFromCstr(p) };
uint32_t s = SysDeleteFile(&req);
uint32_t s = NtlDeleteFile(SysSvFromCstr(p));
if (s != 0) { errno = PosixStatusToErrno(s); return -1; }
return 0;
}