Merge branch 'upstream-merge' into next
[qemu-dev-zwu.git] / bsd-user / openbsd / syscall_nr.h
blobdececfd9e821c0b305b70f3e6a63d2d37ebd4552
1 /* $OpenBSD: syscall.h,v 1.101 2008/03/16 19:43:41 otto Exp $ */
3 /*
4 * System call numbers.
6 * created from; OpenBSD: syscalls.master,v 1.90 2008/03/16 19:42:57 otto Exp
7 */
9 #define TARGET_OPENBSD_NR_syscall 0
10 #define TARGET_OPENBSD_NR_exit 1
11 #define TARGET_OPENBSD_NR_fork 2
12 #define TARGET_OPENBSD_NR_read 3
13 #define TARGET_OPENBSD_NR_write 4
14 #define TARGET_OPENBSD_NR_open 5
15 #define TARGET_OPENBSD_NR_close 6
16 #define TARGET_OPENBSD_NR_wait4 7
17 #define TARGET_OPENBSD_NR_link 9
18 #define TARGET_OPENBSD_NR_unlink 10
19 #define TARGET_OPENBSD_NR_chdir 12
20 #define TARGET_OPENBSD_NR_fchdir 13
21 #define TARGET_OPENBSD_NR_mknod 14
22 #define TARGET_OPENBSD_NR_chmod 15
23 #define TARGET_OPENBSD_NR_chown 16
24 #define TARGET_OPENBSD_NR_break 17
25 #define TARGET_OPENBSD_NR_getpid 20
26 #define TARGET_OPENBSD_NR_mount 21
27 #define TARGET_OPENBSD_NR_unmount 22
28 #define TARGET_OPENBSD_NR_setuid 23
29 #define TARGET_OPENBSD_NR_getuid 24
30 #define TARGET_OPENBSD_NR_geteuid 25
31 #define TARGET_OPENBSD_NR_ptrace 26
32 #define TARGET_OPENBSD_NR_recvmsg 27
33 #define TARGET_OPENBSD_NR_sendmsg 28
34 #define TARGET_OPENBSD_NR_recvfrom 29
35 #define TARGET_OPENBSD_NR_accept 30
36 #define TARGET_OPENBSD_NR_getpeername 31
37 #define TARGET_OPENBSD_NR_getsockname 32
38 #define TARGET_OPENBSD_NR_access 33
39 #define TARGET_OPENBSD_NR_chflags 34
40 #define TARGET_OPENBSD_NR_fchflags 35
41 #define TARGET_OPENBSD_NR_sync 36
42 #define TARGET_OPENBSD_NR_kill 37
43 #define TARGET_OPENBSD_NR_getppid 39
44 #define TARGET_OPENBSD_NR_dup 41
45 #define TARGET_OPENBSD_NR_opipe 42
46 #define TARGET_OPENBSD_NR_getegid 43
47 #define TARGET_OPENBSD_NR_profil 44
48 #define TARGET_OPENBSD_NR_ktrace 45
49 #define TARGET_OPENBSD_NR_sigaction 46
50 #define TARGET_OPENBSD_NR_getgid 47
51 #define TARGET_OPENBSD_NR_sigprocmask 48
52 #define TARGET_OPENBSD_NR_getlogin 49
53 #define TARGET_OPENBSD_NR_setlogin 50
54 #define TARGET_OPENBSD_NR_acct 51
55 #define TARGET_OPENBSD_NR_sigpending 52
56 #define TARGET_OPENBSD_NR_osigaltstack 53
57 #define TARGET_OPENBSD_NR_ioctl 54
58 #define TARGET_OPENBSD_NR_reboot 55
59 #define TARGET_OPENBSD_NR_revoke 56
60 #define TARGET_OPENBSD_NR_symlink 57
61 #define TARGET_OPENBSD_NR_readlink 58
62 #define TARGET_OPENBSD_NR_execve 59
63 #define TARGET_OPENBSD_NR_umask 60
64 #define TARGET_OPENBSD_NR_chroot 61
65 #define TARGET_OPENBSD_NR_vfork 66
66 #define TARGET_OPENBSD_NR_sbrk 69
67 #define TARGET_OPENBSD_NR_sstk 70
68 #define TARGET_OPENBSD_NR_munmap 73
69 #define TARGET_OPENBSD_NR_mprotect 74
70 #define TARGET_OPENBSD_NR_madvise 75
71 #define TARGET_OPENBSD_NR_mincore 78
72 #define TARGET_OPENBSD_NR_getgroups 79
73 #define TARGET_OPENBSD_NR_setgroups 80
74 #define TARGET_OPENBSD_NR_getpgrp 81
75 #define TARGET_OPENBSD_NR_setpgid 82
76 #define TARGET_OPENBSD_NR_setitimer 83
77 #define TARGET_OPENBSD_NR_getitimer 86
78 #define TARGET_OPENBSD_NR_dup2 90
79 #define TARGET_OPENBSD_NR_fcntl 92
80 #define TARGET_OPENBSD_NR_select 93
81 #define TARGET_OPENBSD_NR_fsync 95
82 #define TARGET_OPENBSD_NR_setpriority 96
83 #define TARGET_OPENBSD_NR_socket 97
84 #define TARGET_OPENBSD_NR_connect 98
85 #define TARGET_OPENBSD_NR_getpriority 100
86 #define TARGET_OPENBSD_NR_sigreturn 103
87 #define TARGET_OPENBSD_NR_bind 104
88 #define TARGET_OPENBSD_NR_setsockopt 105
89 #define TARGET_OPENBSD_NR_listen 106
90 #define TARGET_OPENBSD_NR_sigsuspend 111
91 #define TARGET_OPENBSD_NR_gettimeofday 116
92 #define TARGET_OPENBSD_NR_getrusage 117
93 #define TARGET_OPENBSD_NR_getsockopt 118
94 #define TARGET_OPENBSD_NR_readv 120
95 #define TARGET_OPENBSD_NR_writev 121
96 #define TARGET_OPENBSD_NR_settimeofday 122
97 #define TARGET_OPENBSD_NR_fchown 123
98 #define TARGET_OPENBSD_NR_fchmod 124
99 #define TARGET_OPENBSD_NR_setreuid 126
100 #define TARGET_OPENBSD_NR_setregid 127
101 #define TARGET_OPENBSD_NR_rename 128
102 #define TARGET_OPENBSD_NR_flock 131
103 #define TARGET_OPENBSD_NR_mkfifo 132
104 #define TARGET_OPENBSD_NR_sendto 133
105 #define TARGET_OPENBSD_NR_shutdown 134
106 #define TARGET_OPENBSD_NR_socketpair 135
107 #define TARGET_OPENBSD_NR_mkdir 136
108 #define TARGET_OPENBSD_NR_rmdir 137
109 #define TARGET_OPENBSD_NR_utimes 138
110 #define TARGET_OPENBSD_NR_adjtime 140
111 #define TARGET_OPENBSD_NR_setsid 147
112 #define TARGET_OPENBSD_NR_quotactl 148
113 #define TARGET_OPENBSD_NR_nfssvc 155
114 #define TARGET_OPENBSD_NR_getfh 161
115 #define TARGET_OPENBSD_NR_sysarch 165
116 #define TARGET_OPENBSD_NR_pread 173
117 #define TARGET_OPENBSD_NR_pwrite 174
118 #define TARGET_OPENBSD_NR_setgid 181
119 #define TARGET_OPENBSD_NR_setegid 182
120 #define TARGET_OPENBSD_NR_seteuid 183
121 #define TARGET_OPENBSD_NR_lfs_bmapv 184
122 #define TARGET_OPENBSD_NR_lfs_markv 185
123 #define TARGET_OPENBSD_NR_lfs_segclean 186
124 #define TARGET_OPENBSD_NR_lfs_segwait 187
125 #define TARGET_OPENBSD_NR_pathconf 191
126 #define TARGET_OPENBSD_NR_fpathconf 192
127 #define TARGET_OPENBSD_NR_swapctl 193
128 #define TARGET_OPENBSD_NR_getrlimit 194
129 #define TARGET_OPENBSD_NR_setrlimit 195
130 #define TARGET_OPENBSD_NR_getdirentries 196
131 #define TARGET_OPENBSD_NR_mmap 197
132 #define TARGET_OPENBSD_NR___syscall 198
133 #define TARGET_OPENBSD_NR_lseek 199
134 #define TARGET_OPENBSD_NR_truncate 200
135 #define TARGET_OPENBSD_NR_ftruncate 201
136 #define TARGET_OPENBSD_NR___sysctl 202
137 #define TARGET_OPENBSD_NR_mlock 203
138 #define TARGET_OPENBSD_NR_munlock 204
139 #define TARGET_OPENBSD_NR_futimes 206
140 #define TARGET_OPENBSD_NR_getpgid 207
141 #define TARGET_OPENBSD_NR_xfspioctl 208
142 #define TARGET_OPENBSD_NR_semget 221
143 #define TARGET_OPENBSD_NR_msgget 225
144 #define TARGET_OPENBSD_NR_msgsnd 226
145 #define TARGET_OPENBSD_NR_msgrcv 227
146 #define TARGET_OPENBSD_NR_shmat 228
147 #define TARGET_OPENBSD_NR_shmdt 230
148 #define TARGET_OPENBSD_NR_clock_gettime 232
149 #define TARGET_OPENBSD_NR_clock_settime 233
150 #define TARGET_OPENBSD_NR_clock_getres 234
151 #define TARGET_OPENBSD_NR_nanosleep 240
152 #define TARGET_OPENBSD_NR_minherit 250
153 #define TARGET_OPENBSD_NR_rfork 251
154 #define TARGET_OPENBSD_NR_poll 252
155 #define TARGET_OPENBSD_NR_issetugid 253
156 #define TARGET_OPENBSD_NR_lchown 254
157 #define TARGET_OPENBSD_NR_getsid 255
158 #define TARGET_OPENBSD_NR_msync 256
159 #define TARGET_OPENBSD_NR_pipe 263
160 #define TARGET_OPENBSD_NR_fhopen 264
161 #define TARGET_OPENBSD_NR_preadv 267
162 #define TARGET_OPENBSD_NR_pwritev 268
163 #define TARGET_OPENBSD_NR_kqueue 269
164 #define TARGET_OPENBSD_NR_kevent 270
165 #define TARGET_OPENBSD_NR_mlockall 271
166 #define TARGET_OPENBSD_NR_munlockall 272
167 #define TARGET_OPENBSD_NR_getpeereid 273
168 #define TARGET_OPENBSD_NR_getresuid 281
169 #define TARGET_OPENBSD_NR_setresuid 282
170 #define TARGET_OPENBSD_NR_getresgid 283
171 #define TARGET_OPENBSD_NR_setresgid 284
172 #define TARGET_OPENBSD_NR_mquery 286
173 #define TARGET_OPENBSD_NR_closefrom 287
174 #define TARGET_OPENBSD_NR_sigaltstack 288
175 #define TARGET_OPENBSD_NR_shmget 289
176 #define TARGET_OPENBSD_NR_semop 290
177 #define TARGET_OPENBSD_NR_stat 291
178 #define TARGET_OPENBSD_NR_fstat 292
179 #define TARGET_OPENBSD_NR_lstat 293
180 #define TARGET_OPENBSD_NR_fhstat 294
181 #define TARGET_OPENBSD_NR___semctl 295
182 #define TARGET_OPENBSD_NR_shmctl 296
183 #define TARGET_OPENBSD_NR_msgctl 297
184 #define TARGET_OPENBSD_NR_sched_yield 298
185 #define TARGET_OPENBSD_NR_getthrid 299
186 #define TARGET_OPENBSD_NR_thrsleep 300
187 #define TARGET_OPENBSD_NR_thrwakeup 301
188 #define TARGET_OPENBSD_NR_threxit 302
189 #define TARGET_OPENBSD_NR_thrsigdivert 303
190 #define TARGET_OPENBSD_NR___getcwd 304
191 #define TARGET_OPENBSD_NR_adjfreq 305
192 #define TARGET_OPENBSD_NR_getfsstat 306
193 #define TARGET_OPENBSD_NR_statfs 307
194 #define TARGET_OPENBSD_NR_fstatfs 308
195 #define TARGET_OPENBSD_NR_fhstatfs 309
197 /* syscall flags from machine/trap.h */
199 /* $OpenBSD: trap.h,v 1.4 2008/07/04 22:04:37 kettenis Exp $ */
200 /* $NetBSD: trap.h,v 1.4 1999/06/07 05:28:04 eeh Exp $ */
203 * Copyright (c) 1996-1999 Eduardo Horvath
205 * Redistribution and use in source and binary forms, with or without
206 * modification, are permitted provided that the following conditions
207 * are met:
208 * 1. Redistributions of source code must retain the above copyright
209 * notice, this list of conditions and the following disclaimer.
211 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND
212 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
213 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
214 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE
215 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
216 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
217 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
218 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
219 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
220 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
221 * SUCH DAMAGE.
224 #define TARGET_OPENBSD_SYSCALL_G2RFLAG 0x400 /* on success, return to %g2 rather than npc */
225 #define TARGET_OPENBSD_SYSCALL_G7RFLAG 0x800 /* use %g7 as above (deprecated) */