48 lines
1.0 KiB
C
48 lines
1.0 KiB
C
|
|
#ifndef __SYS_SYSCALL_H__
|
|
#define __SYS_SYSCALL_H__
|
|
|
|
#define SYSCALL_NULL 0x00
|
|
#define SYSCALL_TIME 0x01
|
|
#define SYSCALL_EXIT 0x02
|
|
#define SYSCALL_SPAWN 0x03
|
|
#define SYSCALL_GETPID 0x04
|
|
|
|
// Memory
|
|
#define SYSCALL_MMAP 0x08
|
|
#define SYSCALL_MUNMAP 0x09
|
|
#define SYSCALL_MPROTECT 0x0A
|
|
|
|
// Stream
|
|
#define SYSCALL_READ 0x10
|
|
#define SYSCALL_WRITE 0x11
|
|
#define SYSCALL_FLUSH 0x12
|
|
|
|
// File
|
|
#define SYSCALL_OPEN 0x18
|
|
#define SYSCALL_CLOSE 0x19
|
|
#define SYSCALL_MOVE 0x1A
|
|
#define SYSCALL_DELETE 0x1B
|
|
#define SYSCALL_SETLENGTH 0x1C
|
|
#define SYSCALL_STAT 0x1D
|
|
#define SYSCALL_READDIR 0x1E
|
|
|
|
// Threading
|
|
#define SYSCALL_THREADCREATE 0x30
|
|
#define SYSCALL_THREADEXIT 0x31
|
|
#define SYSCALL_THREADSLEEP 0x32
|
|
#define SYSCALL_THREADWAIT 0x33
|
|
|
|
// Network
|
|
#define SYSCALL_SOCKET 0x40
|
|
#define SYSCALL_BIND 0x41
|
|
#define SYSCALL_CONNECT 0x42
|
|
#define SYSCALL_LISTEN 0x43
|
|
#define SYSCALL_SHUTDOWN 0x44
|
|
|
|
uint64_t Syscall_Entry(uint64_t syscall, uint64_t a1, uint64_t a2,
|
|
uint64_t a3, uint64_t a4, uint64_t a5);
|
|
|
|
#endif /* __SYS_SYSCALL_H__ */
|
|
|