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_SETFAULTHANDLER, // 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
29 SYS_LOADMOD, // 20 - Load a module into the kernel
31 SYS_GETPHYS = 32, // 32 - Get the physical address of a page
33 SYS_ALLOCATE, // 34 - Allocate a page
34 SYS_UNMAP, // 35 - Unmap a page
35 SYS_PREALLOC, // 36 - Preallocate a page
36 SYS_SETFLAGS, // 37 - Set a page's flags
37 SYS_SHAREWITH, // 38 - Share a page with another thread
38 SYS_GETUID, // 39 - Get current User ID
39 SYS_GETGID, // 40 - Get current Group ID
40 SYS_SETUID, // 41 - Set current user ID
41 SYS_SETGID, // 42 - Set current Group ID
43 SYS_OPEN = 64, // 64 - Open a file
44 SYS_REOPEN, // 65 - Close a file and reuse its handle
45 SYS_CLOSE, // 66 - Close a file
46 SYS_READ, // 67 - Read from an open file
47 SYS_WRITE, // 68 - Write to an open file
48 SYS_IOCTL, // 69 - Perform an IOCtl Call
49 SYS_READDIR, // 70 - Read from an open directory
50 SYS_OPENCHILD, // 71 - Open a child entry in a directory
51 SYS_MKDIR, // 72 - Create a new directory
52 SYS_SYMLINK, // 73 - Create a symbolic link
53 SYS_GETACL, // 74 - Get an ACL Value
54 SYS_SETACL, // 75 - Set an ACL Value
55 SYS_FINFO, // 76 - Get file information
56 SYS_SEEK, // 77 - Seek to a new position in the file
57 SYS_TELL, // 78 - Return the current file position
58 SYS_CHDIR, // 79 - Change current directory
59 SYS_GETCWD, // 80 - Get current directory
60 SYS_MOUNT, // 81 - Mount a filesystem
62 SYS_DEBUG = 0x100 // 0x100 - Print a debug string
65 static const char *cSYSCALL_NAMES[] = {
66 "SYS_EXIT","SYS_CLONE","SYS_KILL","SYS_SETFAULTHANDLER","SYS_YIELD","SYS_SLEEP",
67 "SYS_WAIT","SYS_WAITTID","SYS_SETNAME","SYS_GETNAME","SYS_GETTID","SYS_GETPID",
68 "SYS_SETPRI","SYS_SENDMSG","SYS_GETMSG","SYS_GETTIME","SYS_SPAWN","SYS_EXECVE",
69 "SYS_LOADBIN","SYS_UNLOADBIN","SYS_LOADMOD","","","",
71 "","","SYS_GETPHYS","SYS_MAP","SYS_ALLOCATE","SYS_UNMAP",
72 "SYS_PREALLOC","SYS_SETFLAGS","SYS_SHAREWITH","SYS_GETUID","SYS_GETGID","SYS_SETUID",
73 "SYS_SETGID","","","","","",
76 "","","","","SYS_OPEN","SYS_REOPEN",
77 "SYS_CLOSE","SYS_READ","SYS_WRITE","SYS_IOCTL","SYS_READDIR","SYS_OPENCHILD",
78 "SYS_MKDIR","SYS_SYMLINK","SYS_GETACL","SYS_SETACL","SYS_FINFO","SYS_SEEK",
79 "SYS_TELL","SYS_CHDIR","SYS_GETCWD","SYS_MOUNT",""