add system time, clean up pci into pci.sys, clean up syscall names, fix USERAPC1 typo

This commit is contained in:
maksw committed 2026-06-11 18:11:59 +02:00
1 parent c1a291c4c9
commit e41bf6e2c0
64 files changed
+4514 -2220

No files matched your search

+5 -5
View File
@@ -7,11 +7,11 @@
#include "posix_path.h"
__declspec(dllexport) void clearscreen(void) {
SysScreenClear(0x012456);
SysClearScreen(0x012456);
}
__declspec(dllexport) void clearkeyboard(void) {
while (SysKbPoll()) (void)SysKbReadChar();
while (SysPollKeyboard()) (void)SysReadKeyboardChar();
}
__declspec(dllexport) int open(const char* path, int flags, ...) {
@@ -64,7 +64,7 @@ __declspec(dllexport) ssize_t read(int fd, void* buf, size_t count) {
// Read up to count chars from keyboard, blocking per char.
char* dst = (char*)buf;
for (size_t i = 0; i < count; i++) {
dst[i] = SysKbReadChar();
dst[i] = SysReadKeyboardChar();
if (dst[i] == '\n' || dst[i] == '\r') return (ssize_t)(i + 1);
}
return (ssize_t)count;
@@ -82,7 +82,7 @@ __declspec(dllexport) ssize_t read(int fd, void* buf, size_t count) {
}
case FD_SOCKET: {
size_t got = 0;
uint32_t s = SysRecv(e->KHandle, buf, count, 0, &got);
uint32_t s = SysRecvSocket(e->KHandle, buf, count, 0, &got);
if (s != 0) { errno = PosixStatusToErrno(s); return -1; }
return (ssize_t)got;
}
@@ -115,7 +115,7 @@ __declspec(dllexport) ssize_t write(int fd, const void* buf, size_t count) {
}
case FD_SOCKET: {
size_t sent = 0;
uint32_t s = SysSend(e->KHandle, buf, count, 0, &sent);
uint32_t s = SysSendSocket(e->KHandle, buf, count, 0, &sent);
if (s != 0) { errno = PosixStatusToErrno(s); return -1; }
return (ssize_t)sent;
}