xref: /haiku/headers/private/kernel/ksyscalls.h (revision 1bd963b6c27017324c3589c8ea29d635e1552b7f)
1 /*
2 ** Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
3 ** Distributed under the terms of the NewOS License.
4 */
5 
6 #include <sys/types.h>
7 #ifndef _KERNEL_SYSCALLS_H
8 #define _KERNEL_SYSCALLS_H
9 
10 enum {
11 	SYSCALL_NULL = 0,
12 	SYSCALL_MOUNT,
13 	SYSCALL_UNMOUNT,
14 	SYSCALL_SYNC,
15 	SYSCALL_OPEN,
16 	SYSCALL_CLOSE,
17 	SYSCALL_FSYNC,
18 	SYSCALL_READ,
19 	SYSCALL_WRITE,
20 	SYSCALL_SEEK,
21 	SYSCALL_IOCTL,	/* 10 */
22 	SYSCALL_CREATE,
23 	SYSCALL_UNLINK,
24 	SYSCALL_RENAME,
25 	SYSCALL_READ_STAT,
26 	SYSCALL_WRITE_STAT,
27 	SYSCALL_SYSTEM_TIME,
28 	SYSCALL_SNOOZE,
29 	SYSCALL_SEM_CREATE,
30 	SYSCALL_SEM_DELETE,
31 	SYSCALL_SEM_ACQUIRE,	/* 20 */
32 	SYSCALL_SEM_ACQUIRE_ETC,
33 	SYSCALL_SEM_RELEASE,
34 	SYSCALL_SEM_RELEASE_ETC,
35 	SYSCALL_GET_CURRENT_THREAD_ID,
36 	SYSCALL_EXIT_THREAD,
37 	SYSCALL_CREATE_TEAM,
38 	SYSCALL_WAIT_ON_THREAD,
39 	SYSCALL_WAIT_ON_TEAM,
40 	SYSCALL_VM_CREATE_ANONYMOUS_REGION,
41 	SYSCALL_VM_CLONE_REGION, /* 30 */
42 	SYSCALL_VM_MAP_FILE,
43 	SYSCALL_VM_DELETE_REGION,
44 	SYSCALL_VM_GET_REGION_INFO,
45 	SYSCALL_VM_FIND_REGION_BY_NAME,
46 	SYSCALL_SPAWN_THREAD,
47 	SYSCALL_KILL_THREAD,
48 	SYSCALL_SUSPEND_THREAD,
49 	SYSCALL_RESUME_THREAD,
50 	SYSCALL_KILL_TEAM,
51 	SYSCALL_GET_CURRENT_TEAM_ID,
52 	SYSCALL_GETCWD, /* 40 */
53 	SYSCALL_SETCWD,
54 	SYSCALL_PORT_CREATE,
55 	SYSCALL_PORT_CLOSE,
56 	SYSCALL_PORT_DELETE,
57 	SYSCALL_PORT_FIND,
58 	SYSCALL_PORT_GET_INFO,
59 	SYSCALL_PORT_GET_NEXT_PORT_INFO,
60 	SYSCALL_PORT_BUFFER_SIZE,
61 	SYSCALL_PORT_BUFFER_SIZE_ETC,
62 	SYSCALL_PORT_COUNT, /* 50 */
63 	SYSCALL_PORT_READ,
64 	SYSCALL_PORT_READ_ETC,
65 	SYSCALL_PORT_SET_OWNER,
66 	SYSCALL_PORT_WRITE,
67 	SYSCALL_PORT_WRITE_ETC,
68 	SYSCALL_SEM_GET_COUNT,
69 	SYSCALL_SEM_GET_SEM_INFO,
70 	SYSCALL_SEM_GET_NEXT_SEM_INFO,
71 	SYSCALL_SEM_SET_SEM_OWNER,
72 	SYSCALL_FDDUP, /* 60 */
73 	SYSCALL_FDDUP2,
74 	SYSCALL_GET_PROC_TABLE,
75 	SYSCALL_GETRLIMIT,
76 	SYSCALL_SETRLIMIT,
77 	SYSCALL_ATOMIC_ADD,
78 	SYSCALL_ATOMIC_AND,
79 	SYSCALL_ATOMIC_OR,
80 	SYSCALL_ATOMIC_SET,
81 	SYSCALL_TEST_AND_SET, /* 70 */
82 	SYSCALL_SYSCTL,
83 	SYSCALL_SOCKET,
84 	SYSCALL_ACCESS,
85 	SYSCALL_READ_STAT_FD,
86 	SYSCALL_READ_DIR,
87 	SYSCALL_REWIND_DIR,
88 	SYSCALL_OPEN_DIR,
89 	SYSCALL_CREATE_DIR,
90 	SYSCALL_SETENV,
91 	SYSCALL_GETENV, /* 80 */
92 	SYSCALL_OPEN_ENTRY_REF,
93 	SYSCALL_OPEN_DIR_ENTRY_REF,
94 	SYSCALL_OPEN_DIR_NODE_REF,
95 	SYSCALL_CREATE_ENTRY_REF,
96 	SYSCALL_CREATE_DIR_ENTRY_REF,
97 	SYSCALL_CREATE_SYMLINK,
98 	SYSCALL_READ_LINK,
99 	SYSCALL_GET_THREAD_INFO,
100 	SYSCALL_GET_NEXT_THREAD_INFO,
101 	SYSCALL_GET_TEAM_INFO, /* 90 */
102 	SYSCALL_GET_NEXT_TEAM_INFO,
103 	SYSCALL_CREATE_LINK,
104 	SYSCALL_REMOVE_DIR,
105 	SYSCALL_SEND_DATA,
106 	SYSCALL_RECEIVE_DATA,
107 	SYSCALL_HAS_DATA,
108 };
109 
110 int syscall_dispatcher(unsigned long call_num, void *arg_buffer, uint64 *call_ret);
111 
112 #endif
113 
114