metal-cos/include/syscall.h

24 lines
638 B
C
Raw Normal View History

#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);
2014-10-14 23:24:47 +00:00
// 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);
2014-10-14 23:24:47 +00:00
int SystemFlush(uint64_t fd);
uint64_t SystemOpen(const char *path, uint64_t flags);
int SystemClose(uint64_t fd);
2014-10-14 23:24:47 +00:00
#endif /* __SYSCALL_H__ */