2 * AcessOS Microkernel Version
9 SYS_EXIT, // 0 - Kill this thread
10 SYS_CLONE, // 1 - Create a new thread
11 SYS_KILL, // 2 - Send a signal
12 SYS_SIGNAL, // 3 - Set signal Handler
13 SYS_YIELD, // 4 - Yield remainder of timestamp
14 SYS_SLEEP, // 5 - Sleep until messaged or signaled
15 SYS_WAIT, // 6 - Wait for a time or a message
16 SYS_WAITTID, // 7 - Wait for a thread to do something
17 SYS_SETNAME, // 8 - Set's the name of the current thread
18 SYS_GETNAME, // 9 - Get's the name of a thread
19 SYS_GETTID, // 10 - Get current thread ID
20 SYS_GETPID, // 11 - Get current thread group ID
21 SYS_SETPRI, // 12 - Set process priority
22 SYS_SENDMSG, // 13 - Send an IPC message
23 SYS_GETMSG, // 14 - Recieve an IPC message
24 SYS_GETTIME, // 15 - Get the current timestamp
25 SYS_SPAWN, // 16 - Spawn a new process
26 SYS_EXECVE, // 17 - Replace the current process
27 SYS_LOADBIN, // 18 - Load a binary into the current address space
28 SYS_UNLOADBIN, // 19 - Unload a loaded binary
30 SYS_GETPHYS = 32, // 32 - Get the physical address of a page
31 SYS_MAP, // 33 - Map a physical address
32 SYS_ALLOCATE, // 34 - Allocate a page
33 SYS_UNMAP, // 35 - Unmap a page
34 SYS_PREALLOC, // 36 - Preallocate a page
35 SYS_SETFLAGS, // 37 - Set a page's flags
36 SYS_SHAREWITH, // 38 - Share a page with another thread
37 SYS_GETUID, // 39 - Get current User ID
38 SYS_GETGID, // 40 - Get current Group ID
39 SYS_SETUID, // 41 - Set current user ID
40 SYS_SETGID, // 42 - Set current Group ID
42 SYS_OPEN = 64, // 64 - Open a file
43 SYS_REOPEN, // 65 - Close a file and reuse its handle
44 SYS_CLOSE, // 66 - Close a file
45 SYS_READ, // 67 - Read from an open file
46 SYS_WRITE, // 68 - Write to an open file
47 SYS_IOCTL, // 69 - Perform an IOCtl Call
48 SYS_READDIR, // 70 - Read from an open directory
49 SYS_MKDIR, // 71 - Create a new directory
50 SYS_SYMLINK, // 72 - Create a symbolic link
51 SYS_GETACL, // 73 - Get an ACL Value
52 SYS_SETACL, // 74 - Set an ACL Value
53 SYS_FINFO, // 75 - Get file information
54 SYS_SEEK, // 76 - Seek to a new position in the file
55 SYS_TELL, // 77 - Return the current file position
57 SYS_DEBUG = 0x100 // 0x100 - Print a debug string
60 static const char *cSYSCALL_NAMES[] = {
61 "SYS_EXIT","SYS_CLONE","SYS_KILL","SYS_SIGNAL","SYS_YIELD","SYS_SLEEP",
62 "SYS_WAIT","SYS_WAITTID","SYS_SETNAME","SYS_GETNAME","SYS_GETTID","SYS_GETPID",
63 "SYS_SETPRI","SYS_SENDMSG","SYS_GETMSG","SYS_GETTIME","SYS_SPAWN","SYS_EXECVE",
64 "SYS_LOADBIN","SYS_UNLOADBIN","","","","",
66 "","","SYS_GETPHYS","SYS_MAP","SYS_ALLOCATE","SYS_UNMAP",
67 "SYS_PREALLOC","SYS_SETFLAGS","SYS_SHAREWITH","SYS_GETUID","SYS_GETGID","SYS_SETUID",
68 "SYS_SETGID","","","","","",
71 "","","","","SYS_OPEN","SYS_REOPEN",
72 "SYS_CLOSE","SYS_READ","SYS_WRITE","SYS_IOCTL","SYS_READDIR","SYS_MKDIR",
73 "SYS_SYMLINK","SYS_GETACL","SYS_SETACL","SYS_FINFO","SYS_SEEK","SYS_TELL",