mount: -debug stuff
[meinos.git] / include / syscalls.h
blob6d5421841d09bce196715530083d32d4ab795cfb
1 /*
2 meinOS - A unix-like x86 microkernel operating system
3 Copyright (C) 2008 Janosch Gräf <janosch.graef@gmx.net>
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
19 #ifndef _SYSCALLS_H_
20 #define _SYSCALLS_H_
22 #define SYSCALL_INT 0x37
23 #define SYSCALL_MAXNUM (SYSCALL_FOURTYTWO+1)
25 // Memory
26 #define SYSCALL_MEM_MALLOC 1
27 #define SYSCALL_MEM_FREE 2
28 #define SYSCALL_MEM_GETPHYSADDR 3
29 #define SYSCALL_MEM_DMA_ALLOC 4 /* ONLY FOR ROOT */
30 #define SYSCALL_MEM_DMA_FREE 5 /* ONLY FOR ROOT */
31 #define SYSCALL_MEM_GETVGA 6 /* ONLY FOR ROOT */
33 // IPC
34 // Message Passing
35 #define SYSCALL_IPC_MSG_GET 7
36 #define SYSCALL_IPC_MSG_CREATE 8
37 #define SYSCALL_IPC_MSG_DESTROY 9
38 #define SYSCALL_IPC_MSG_SEND 10
39 #define SYSCALL_IPC_MSG_RECV 11
40 #define SYSCALL_IPC_MSG_STAT 12
41 #define SYSCALL_IPC_MSG_SET 13
42 // Semaphore
43 #define SYSCALL_IPC_SEM_GET 14
44 #define SYSCALL_IPC_SEM_CREATE 15
45 #define SYSCALL_IPC_SEM_OP 16
46 #define SYSCALL_IPC_SEM_GETVAL 17
47 #define SYSCALL_IPC_SEM_SETVAL 18
48 #define SYSCALL_IPC_SEM_GETPID 19
49 #define SYSCALL_IPC_SEM_GETCNT 20
50 #define SYSCALL_IPC_SEM_GETALL 21
51 #define SYSCALL_IPC_SEM_SETALL 22
52 #define SYSCALL_IPC_SEM_STAT 23
53 #define SYSCALL_IPC_SEM_SET 24
54 #define SYSCALL_IPC_SEM_DESTROY 25
55 // Shared Memory
56 #define SYSCALL_IPC_SHM_GET 26
57 #define SYSCALL_IPC_SHM_CREATE 27
58 #define SYSCALL_IPC_SHM_ATTACH 28
59 #define SYSCALL_IPC_SHM_DETACH 29
60 #define SYSCALL_IPC_SHM_STAT 30
61 #define SYSCALL_IPC_SHM_SET 31
62 #define SYSCALL_IPC_SHM_DESTROY 32
64 // RPC
65 #define SYSCALL_RPC_CREATE 33
66 #define SYSCALL_RPC_DESTROY 34
67 #define SYSCALL_RPC_GETINFO 35
68 #define SYSCALL_RPC_CALL 36
69 #define SYSCALL_RPC_POLL 37
70 #define SYSCALL_RPC_RETURN 38
71 #define SYSCALL_RPC_LIST 39
73 // Process
74 #define SYSCALL_PROC_GETPID 40
75 #define SYSCALL_PROC_GETUID 41
76 #define SYSCALL_PROC_GETGID 42
77 #define SYSCALL_PROC_SETUID 43
78 #define SYSCALL_PROC_SETGID 44
79 #define SYSCALL_PROC_GETPARENT 45
80 #define SYSCALL_PROC_GETCHILD 46
81 #define SYSCALL_PROC_GETNAME 47
82 #define SYSCALL_PROC_SETNAME 48 /* ONLY FOR SYSTEM */
83 #define SYSCALL_PROC_GETPIDBYNAME 49
84 #define SYSCALL_PROC_GETVAR 50
85 #define SYSCALL_PROC_SETVAR 51
86 #define SYSCALL_PROC_EXIT 52
87 #define SYSCALL_PROC_ABORT 53
88 #define SYSCALL_PROC_STOP 54
89 #define SYSCALL_PROC_CREATE 55 /* ONLY FOR SYSTEM */
90 #define SYSCALL_PROC_DESTROY 56 /* ONLY FOR SYSTEM */
91 #define SYSCALL_PROC_MEMMAP 57 /* ONLY FOR SYSTEM */
92 #define SYSCALL_PROC_MEMALLOC 58 /* ONLY FOR SYSTEM */
93 #define SYSCALL_PROC_MEMUNMAP 59 /* ONLY FOR SYSTEM */
94 #define SYSCALL_PROC_MEMFREE 60 /* ONLY FOR SYSTEM */
95 #define SYSCALL_PROC_MEMFINDFREE 61 /* ONLY FOR SYSTEM */
96 #define SYSCALL_PROC_MEMGET 62 /* ONLY FOR SYSTEM */
97 #define SYSCALL_PROC_SYSTEM 63 /* ONLY FOR SYSTEM */
98 #define SYSCALL_PROC_JUMP 64 /* ONLY FOR SYSTEM */
99 #define SYSCALL_PROC_CREATESTACK 65 /* ONLY FOR SYSTEM */
100 #define SYSCALL_PROC_WAITPID 66
102 // I/O port
103 #define SYSCALL_IO_REG 67 /* ONLY FOR ROOT */
104 #define SYSCALL_IO_UNREG 68 /* ONLY FOR ROOT */
106 // Timer
107 #define SYSCALL_TIME_HANDLER 69
108 #define SYSCALL_TIME_SLEEP 70
109 #define SYSCALL_TIME_USLEEP 71
110 #define SYSCALL_TIME_GETTICKS 72
112 // IRQ
113 #define SYSCALL_IRQ_HANDLER 73 /* ONLY FOR ROOT */
114 #define SYSCALL_IRQ_SLEEP 74 /* ONLY FOR ROOT */
116 // Signal
117 #define SYSCALL_SIG_SETUP 75
118 #define SYSCALL_SIG_SEND 76
120 // Misc
121 #define SYSCALL_MISC_BIOSINT 77 /* ONLY FOR ROOT */
123 // Debug
124 /// @deprecated Only for debugging
125 #define SYSCALL_PUTSN 78
126 #define SYSCALL_FOURTYTWO 79
128 #endif