feat(userspace): add ring-3 runtime startup and syscall wrappers

This commit is contained in:
dualfroz committed 2026-08-27 19:47:42 +02:00
1 parent dc5afa0250
commit b15dfc048a
4 files changed
+186

No files matched your search

+27
View File
@@ -0,0 +1,27 @@
#ifndef FROSTBYTE_ULIB_H
#define FROSTBYTE_ULIB_H
#include "syscall.h"
#include "fs.h"
long userWrite(int fd, const char* buffer, unsigned long length);
long userRead(int fd, char* buffer, unsigned long length);
void userExit(int code);
long userYield(void);
long userGetpid(void);
void* userSbrk(long increment);
void userSleep(unsigned long milliseconds);
long userOpen(const char* path, unsigned int flags);
long userClose(int fd);
long userLseek(int fd, long offset, int whence);
long userStat(const char* path, FbStat* out);
long userGetdents(int fd, FbDirent* out, unsigned long length);
long userMkdir(const char* path);
long userUnlink(const char* path);
void print(const char* text);
void printDec(long value);
unsigned long stringLength(const char* text);
#endif