xref: /haiku/headers/private/kernel/ksyscalls.h (revision 81f5654c124bf46fba0fd251f208e2d88d81e1ce)
1 /*
2 ** Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
3 ** Distributed under the terms of the NewOS License.
4 */
5 #ifndef _KERNEL_SYSCALLS_H
6 #define _KERNEL_SYSCALLS_H
7 
8 #include <sys/types.h>
9 
10 
11 enum {
12 	SYSCALL_NULL = 0,
13 	SYSCALL_MOUNT,
14 	SYSCALL_UNMOUNT,
15 	SYSCALL_SYNC,
16 	SYSCALL_OPEN,
17 	SYSCALL_CLOSE,
18 	SYSCALL_FSYNC,
19 	SYSCALL_READ,
20 	SYSCALL_WRITE,
21 	SYSCALL_SEEK,
22 	SYSCALL_IOCTL,					/* 10 */
23 	SYSCALL_CREATE,
24 	SYSCALL_UNLINK,
25 	SYSCALL_RENAME,
26 	SYSCALL_READ_PATH_STAT,
27 	SYSCALL_WRITE_PATH_STAT,
28 	SYSCALL_SYSTEM_TIME,
29 	SYSCALL_SNOOZE_ETC,
30 	SYSCALL_SEM_CREATE,
31 	SYSCALL_SEM_DELETE,
32 	SYSCALL_SEM_ACQUIRE,			/* 20 */
33 	SYSCALL_SEM_ACQUIRE_ETC,
34 	SYSCALL_SEM_RELEASE,
35 	SYSCALL_SEM_RELEASE_ETC,
36 	SYSCALL_FIND_THREAD,
37 	SYSCALL_EXIT_THREAD,
38 	SYSCALL_CREATE_TEAM,
39 	SYSCALL_WAIT_FOR_THREAD,
40 	SYSCALL_WAIT_FOR_TEAM,
41 	SYSCALL_CREATE_AREA,
42 	SYSCALL_CLONE_AREA,				/* 30 */
43 	SYSCALL_VM_MAP_FILE,
44 	SYSCALL_DELETE_AREA,
45 	SYSCALL_GET_AREA_INFO,
46 	SYSCALL_FIND_AREA,
47 	SYSCALL_SPAWN_THREAD,
48 	SYSCALL_KILL_THREAD,
49 	SYSCALL_SUSPEND_THREAD,
50 	SYSCALL_RESUME_THREAD,
51 	SYSCALL_KILL_TEAM,
52 	SYSCALL_GET_CURRENT_TEAM_ID,
53 	SYSCALL_GETCWD,					/* 40 */
54 	SYSCALL_SETCWD,
55 	SYSCALL_PORT_CREATE,
56 	SYSCALL_PORT_CLOSE,
57 	SYSCALL_PORT_DELETE,
58 	SYSCALL_PORT_FIND,
59 	SYSCALL_PORT_GET_INFO,
60 	SYSCALL_PORT_GET_NEXT_PORT_INFO,
61 	SYSCALL_PORT_BUFFER_SIZE,
62 	SYSCALL_PORT_BUFFER_SIZE_ETC,
63 	SYSCALL_PORT_COUNT,				/* 50 */
64 	SYSCALL_PORT_READ,
65 	SYSCALL_PORT_READ_ETC,
66 	SYSCALL_PORT_SET_OWNER,
67 	SYSCALL_PORT_WRITE,
68 	SYSCALL_PORT_WRITE_ETC,
69 	SYSCALL_SEM_GET_COUNT,
70 	SYSCALL_SEM_GET_SEM_INFO,
71 	SYSCALL_SEM_GET_NEXT_SEM_INFO,
72 	SYSCALL_SEM_SET_SEM_OWNER,
73 	SYSCALL_FDDUP,					/* 60 */
74 	SYSCALL_FDDUP2,
75 	SYSCALL_GET_PROC_TABLE,
76 	SYSCALL_GETRLIMIT,
77 	SYSCALL_SETRLIMIT,
78 	SYSCALL_unused_66,
79 	SYSCALL_unused_67,
80 	SYSCALL_unused_68,
81 	SYSCALL_unused_69,
82 	SYSCALL_unused_70,				/* 70 */
83 	SYSCALL_SYSCTL,
84 	SYSCALL_SOCKET,
85 	SYSCALL_ACCESS,
86 	SYSCALL_READ_STAT,
87 	SYSCALL_READ_DIR,
88 	SYSCALL_REWIND_DIR,
89 	SYSCALL_OPEN_DIR,
90 	SYSCALL_CREATE_DIR,
91 	SYSCALL_SETENV,
92 	SYSCALL_GETENV, 				/* 80 */
93 	SYSCALL_OPEN_ENTRY_REF,
94 	SYSCALL_OPEN_DIR_ENTRY_REF,
95 	SYSCALL_OPEN_DIR_NODE_REF,
96 	SYSCALL_CREATE_ENTRY_REF,
97 	SYSCALL_CREATE_DIR_ENTRY_REF,	/* 85 */
98 	SYSCALL_CREATE_SYMLINK,
99 	SYSCALL_READ_LINK,
100 	SYSCALL_GET_THREAD_INFO,
101 	SYSCALL_GET_NEXT_THREAD_INFO,
102 	SYSCALL_GET_TEAM_INFO,			/* 90 */
103 	SYSCALL_GET_NEXT_TEAM_INFO,
104 	SYSCALL_CREATE_LINK,
105 	SYSCALL_REMOVE_DIR,
106 	SYSCALL_SEND_DATA,
107 	SYSCALL_RECEIVE_DATA,			/* 95 */
108 	SYSCALL_HAS_DATA,
109 	SYSCALL_OPEN_ATTR_DIR,
110 	SYSCALL_CREATE_ATTR,
111 	SYSCALL_OPEN_ATTR,
112 	SYSCALL_WRITE_STAT,				/* 100 */
113 	SYSCALL_REMOVE_ATTR,
114 	SYSCALL_RENAME_ATTR,
115 	SYSCALL_RETURN_FROM_SIGNAL,
116 	SYSCALL_unused_104,
117 	SYSCALL_SIGACTION,				/* 105 */
118 	SYSCALL_OPEN_INDEX_DIR,
119 	SYSCALL_CREATE_INDEX,
120 	SYSCALL_READ_INDEX_STAT,
121 	SYSCALL_REMOVE_INDEX,
122 	SYSCALL_SEND_SIGNAL,			/* 110 */
123 	SYSCALL_SET_ALARM,
124 	SYSCALL_SELECT,
125 	SYSCALL_POLL,
126 	SYSCALL_REGISTER_IMAGE,
127 	SYSCALL_UNREGISTER_IMAGE,		/* 115 */
128 	SYSCALL_GET_IMAGE_INFO,
129 	SYSCALL_GET_NEXT_IMAGE_INFO,
130 	SYSCALL_START_WATCHING,
131 	SYSCALL_STOP_WATCHING,
132 	SYSCALL_STOP_NOTIFYING,			/* 120 */
133 	SYSCALL_SET_THREAD_PRIORITY,
134 	SYSCALL_GET_NEXT_AREA_INFO,
135 	SYSCALL_SET_AREA_PROTECTION,
136 	SYSCALL_RESIZE_AREA,
137 	SYSCALL_AREA_FOR,				/* 125 */
138 	SYSCALL_ATOMIC_SET,
139 	SYSCALL_ATOMIC_TEST_AND_SET,
140 	SYSCALL_ATOMIC_ADD,
141 	SYSCALL_ATOMIC_AND,
142 	SYSCALL_ATOMIC_OR,				/* 130 */
143 	SYSCALL_ATOMIC_GET,
144 	SYSCALL_ATOMIC_SET64,
145 	SYSCALL_ATOMIC_TEST_AND_SET64,
146 	SYSCALL_ATOMIC_ADD64,
147 	SYSCALL_ATOMIC_AND64,			/* 135 */
148 	SYSCALL_ATOMIC_OR64,
149 	SYSCALL_ATOMIC_GET64,
150 	SYSCALL_SET_REAL_TIME_CLOCK,
151 	SYSCALL_DEBUG_OUTPUT,
152 	SYSCALL_GET_SYSTEM_INFO,		/* 140 */
153 };
154 
155 int syscall_dispatcher(unsigned long call_num, void *arg_buffer, uint64 *call_ret);
156 
157 #endif	/* _KERNEL_SYSCALLS_H */
158