2c44d2c87e4cdb8c3edd094cb1ad4ae4311c918f
[tpg/acess2.git] / Kernel / include / syscalls.h
1 /*
2  * AcessOS Microkernel Version
3  * syscalls.h
4  */
5 #ifndef _SYSCALLS_H
6 #define _SYSCALLS_H
7
8 enum eSyscalls {
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
29         SYS_LOADMOD,    // 20 - Load a module into the kernel
30
31         SYS_GETPHYS = 32,       // 32 - Get the physical address of a page
32         SYS_MAP,        // 33 -         Map a physical address
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
42
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_MKDIR,      // 71 - Create a new directory
51         SYS_SYMLINK,    // 72 - Create a symbolic link
52         SYS_GETACL,     // 73 - Get an ACL Value
53         SYS_SETACL,     // 74 - Set an ACL Value
54         SYS_FINFO,      // 75 - Get file information
55         SYS_SEEK,       // 76 - Seek to a new position in the file
56         SYS_TELL,       // 77 - Return the current file position
57         SYS_CHDIR,      // 78 - Change current directory
58         SYS_GETCWD,     // 79 - Get current directory
59         SYS_MOUNT,      // 80 - Mount a filesystem
60         NUM_SYSCALLS,
61         SYS_DEBUG = 0x100       // 0x100 - Print a debug string
62 };
63
64 static const char *cSYSCALL_NAMES[] = {
65         "SYS_EXIT","SYS_CLONE","SYS_KILL","SYS_SIGNAL","SYS_YIELD","SYS_SLEEP",
66         "SYS_WAIT","SYS_WAITTID","SYS_SETNAME","SYS_GETNAME","SYS_GETTID","SYS_GETPID",
67         "SYS_SETPRI","SYS_SENDMSG","SYS_GETMSG","SYS_GETTIME","SYS_SPAWN","SYS_EXECVE",
68         "SYS_LOADBIN","SYS_UNLOADBIN","SYS_LOADMOD","","","",
69         "","","","","","",
70         "","","SYS_GETPHYS","SYS_MAP","SYS_ALLOCATE","SYS_UNMAP",
71         "SYS_PREALLOC","SYS_SETFLAGS","SYS_SHAREWITH","SYS_GETUID","SYS_GETGID","SYS_SETUID",
72         "SYS_SETGID","","","","","",
73         "","","","","","",
74         "","","","","","",
75         "","","","","SYS_OPEN","SYS_REOPEN",
76         "SYS_CLOSE","SYS_READ","SYS_WRITE","SYS_IOCTL","SYS_READDIR","SYS_MKDIR",
77         "SYS_SYMLINK","SYS_GETACL","SYS_SETACL","SYS_FINFO","SYS_SEEK","SYS_TELL",
78         "SYS_CHDIR","SYS_GETCWD","SYS_MOUNT",""
79 };
80 #endif

UCC git Repository :: git.ucc.asn.au