2 * AcessOS Microkernel Version
9 SYS_EXIT, // 0 - Kill Current Thread
10 SYS_CLONE, // 1 - Create a new thread
11 SYS_KILL, // 2 - Send a signal
12 SYS_SIGNAL, // 3 - Set a 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 terminate
18 SYS_SETNAME, // 8 - Set thread's name
19 SYS_GETNAME, // 9 - Get a thread's name
20 SYS_GETTID, // 10 - Get current thread ID
21 SYS_GETPID, // 11 - Get current thread group ID
23 SYS_SETPRI, // 12 - Set Priority
25 SYS_SENDMSG, // 13 - Send an IPC message
26 SYS_GETMSG, // 14 - Recieve an IPC message
28 SYS_GETTIME, // 15 - Get the current timestamp
30 SYS_SPAWN, // 16 - Fork and Execve
31 SYS_EXECVE, // 17 - Replace the current process image with another
32 SYS_LOADBIN, // 18 - Load a binary image into memory
33 SYS_UNLOADBIN, // 19 - Unload a loaded binary image
35 // Address Space & Permissions (001x xxxx)
36 SYS_GETPHYS=32, // 32 - Gets the physical address of a page
37 SYS_MAP, // 33 - Map a physical page
38 SYS_ALLOCATE, // 34 - Allocate a page
39 SYS_UNMAP, // 35 - Unmap a page
40 SYS_PREALLOC, // 36 - Preallocates a page
41 SYS_SETFLAGS, // 37 - Sets a page's flags
42 SYS_SHAREWITH, // 38 - Share a page with another thread
44 SYS_GETUID, // 39 - Get current User ID
45 SYS_GETGID, // 40 - Get current Group ID
46 SYS_SETUID, // 41 - Set the current User ID
47 SYS_SETGID, // 42 - Set the current Group ID
50 SYS_OPEN = 64, // 64 - Open a file
51 SYS_REOPEN, // 65 - Close a file and reuse its handle
52 SYS_CLOSE, // 66 - Close and open file
53 SYS_READ, // 67 - Read from a file
54 SYS_WRITE, // 68 - Write to a file
55 SYS_IOCTL, // 69 - Call a file's IOCtl method
56 SYS_READDIR, // 70 - Read from a directory
57 SYS_MKDIR, // 71 - Make new directory
58 SYS_SYMLINK, // 72 - Create a symbolic link
59 SYS_GETACL, // 73 - Get an ACL
60 SYS_SETACL, // 74 - Set an ACL
61 SYS_FINFO, // 75 - Get a file's information
65 SYS_DEBUG = 0x100 // Print a debug string
68 static const char *cSYSCALL_NAMES[] = {
69 "SYS_EXIT", "SYS_CLONE", "SYS_KILL", "SYS_SIGNAL", "SYS_YIELD", "SYS_SLEEP", "SYS_WAIT",
71 "SYS_SETNAME", "SYS_GETNAME", "SYS_GETTID", "SYS_GETPID", "SYS_SETPRI",
72 "SYS_SENDMSG", "SYS_GETMSG",
74 "SYS_SPAWN", "SYS_EXECVE", "SYS_LOADBIN",
75 "", "", "", "", "", "", "", "", "", "", "", "",
77 "SYS_GETPHYS", "SYS_MAP", "SYS_ALLOCATE", "SYS_UNMAP",
78 "SYS_PREALLOC", "SYS_SETFLAGS", "SYS_SHAREWITH",
79 "SYS_GETUID", "SYS_GETGID", "SYS_SETUID", "SYS_SETGID",
81 "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
83 "SYS_OPEN", "SYS_REOPEN", "SYS_CLOSE",
84 "SYS_READ", "SYS_WRITE", "SYS_IOCTL",
85 "SYS_READDIR", "SYS_MKDIR", "SYS_SYMLINK",
86 "SYS_GETACL", "SYS_SETACL", "SYS_FINFO"