more userlaand stuff

This commit is contained in:
2026-06-17 18:16:47 -05:00
parent 0cb7311911
commit 7d34fbbd02
11 changed files with 116 additions and 13 deletions

17
libc/include/rock.h Normal file
View File

@@ -0,0 +1,17 @@
#ifndef LIBC_ROCK_H
#define LIBC_ROCK_H
#include <stdint.h>
static inline int32_t syscall(int num, uint32_t arg1, uint32_t arg2, uint32_t arg3) {
int32_t ret;
__asm__ __volatile__ (
"int $0x80"
: "=a" (ret)
: "0" (num), "b" (arg1), "c" (arg2), "d" (arg3)
: "memory"
);
return ret;
}
#endif