metal-cos/include/syscall.h
2014-11-29 15:46:17 -08:00

27 lines
688 B
C

#ifndef __SYSCALL_H__
#define __SYSCALL_H__
uint64_t SystemTime();
void SystemExit(int status);
uint64_t SystemGetPID();
uint64_t SystemSpawn(const char *path);
// Memory
void *SystemMemMap(void *addr, uint64_t len, int flags);
int SystemMemUnmap(void *addr, uint64_t len);
int SystemMemProtect(void *addr, uint64_t len, int flags);
// IO
int SystemRead(uint64_t fd, void *addr, uint64_t off, uint64_t length);
int SystemWrite(uint64_t fd, const void *addr, uint64_t off, uint64_t length);
int SystemFlush(uint64_t fd);
uint64_t SystemOpen(const char *path, uint64_t flags);
int SystemClose(uint64_t fd);
// Threads
int SystemThreadSleep(uint64_t time);
#endif /* __SYSCALL_H__ */