Print this page
remove support for non-ANSI compilation
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/common/sys/syscall.h
+++ new/usr/src/uts/common/sys/syscall.h
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License (the "License").
6 6 * You may not use this file except in compliance with the License.
7 7 *
8 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 * or http://www.opensolaris.org/os/licensing.
10 10 * See the License for the specific language governing permissions
11 11 * and limitations under the License.
12 12 *
↓ open down ↓ |
12 lines elided |
↑ open up ↑ |
13 13 * When distributing Covered Code, include this CDDL HEADER in each
14 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 * If applicable, add the following below this CDDL HEADER, with the
16 16 * fields enclosed by brackets "[]" replaced with your own identifying
17 17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 18 *
19 19 * CDDL HEADER END
20 20 */
21 21
22 22 /*
23 + * Copyright 2014 Garrett D'Amore <garrett@damore.org>
23 24 * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
24 25 * Copyright (c) 2013 by Delphix. All rights reserved.
25 26 */
26 27
27 28 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
28 29 /* All Rights Reserved */
29 30
30 31 #ifndef _SYS_SYSCALL_H
31 32 #define _SYS_SYSCALL_H
32 33
33 34 #ifdef __cplusplus
34 35 extern "C" {
35 36 #endif
36 37
37 38 /*
38 39 * system call numbers
39 40 * syscall(SYS_xxxx, ...)
40 41 */
41 42
42 43 /* syscall enumeration MUST begin with 1 */
43 44
44 45 /*
45 46 * SunOS/SPARC uses 0 for the indirect system call SYS_syscall
46 47 * but this doesn't count because it is just another way
47 48 * to specify the real system call number.
48 49 */
49 50
50 51 #define SYS_syscall 0
51 52 #define SYS_exit 1
52 53 #define SYS_read 3
53 54 #define SYS_write 4
54 55 #define SYS_open 5
55 56 #define SYS_close 6
56 57 #define SYS_linkat 7
57 58 #define SYS_link 9
58 59 #define SYS_unlink 10
59 60 #define SYS_symlinkat 11
60 61 #define SYS_chdir 12
61 62 #define SYS_time 13
62 63 #define SYS_mknod 14
63 64 #define SYS_chmod 15
64 65 #define SYS_chown 16
65 66 #define SYS_brk 17
66 67 #define SYS_stat 18
67 68 #define SYS_lseek 19
68 69 #define SYS_getpid 20
69 70 #define SYS_mount 21
70 71 #define SYS_readlinkat 22
71 72 #define SYS_setuid 23
72 73 #define SYS_getuid 24
73 74 #define SYS_stime 25
74 75 #define SYS_pcsample 26
75 76 #define SYS_alarm 27
76 77 #define SYS_fstat 28
77 78 #define SYS_pause 29
78 79 #define SYS_stty 31
79 80 #define SYS_gtty 32
80 81 #define SYS_access 33
81 82 #define SYS_nice 34
82 83 #define SYS_statfs 35
83 84 #define SYS_sync 36
84 85 #define SYS_kill 37
85 86 #define SYS_fstatfs 38
86 87 #define SYS_pgrpsys 39
87 88 /*
88 89 * subcodes:
89 90 * getpgrp() :: syscall(39,0)
90 91 * setpgrp() :: syscall(39,1)
91 92 * getsid(pid) :: syscall(39,2,pid)
92 93 * setsid() :: syscall(39,3)
93 94 * getpgid(pid) :: syscall(39,4,pid)
94 95 * setpgid(pid,pgid) :: syscall(39,5,pid,pgid)
95 96 */
96 97 #define SYS_uucopystr 40
97 98 #define SYS_pipe 42
98 99 #define SYS_times 43
99 100 #define SYS_profil 44
100 101 #define SYS_faccessat 45
101 102 #define SYS_setgid 46
102 103 #define SYS_getgid 47
103 104 #define SYS_mknodat 48
104 105 #define SYS_msgsys 49
105 106 /*
106 107 * subcodes:
107 108 * msgget(...) :: msgsys(0, ...)
108 109 * msgctl(...) :: msgsys(1, ...)
109 110 * msgrcv(...) :: msgsys(2, ...)
110 111 * msgsnd(...) :: msgsys(3, ...)
111 112 * msgids(...) :: msgsys(4, ...)
112 113 * msgsnap(...) :: msgsys(5, ...)
113 114 * see <sys/msg.h>
114 115 */
115 116 #define SYS_sysi86 50
116 117 /*
117 118 * subcodes:
118 119 * sysi86(code, ...)
119 120 */
120 121 #define SYS_acct 51
121 122 #define SYS_shmsys 52
122 123 /*
123 124 * subcodes:
124 125 * shmat (...) :: shmsys(0, ...)
125 126 * shmctl(...) :: shmsys(1, ...)
126 127 * shmdt (...) :: shmsys(2, ...)
127 128 * shmget(...) :: shmsys(3, ...)
128 129 * shmids(...) :: shmsys(4, ...)
129 130 * see <sys/shm.h>
130 131 */
131 132 #define SYS_semsys 53
132 133 /*
133 134 * subcodes:
134 135 * semctl(...) :: semsys(0, ...)
135 136 * semget(...) :: semsys(1, ...)
136 137 * semop (...) :: semsys(2, ...)
137 138 * semids(...) :: semsys(3, ...)
138 139 * semtimedop(...) :: semsys(4, ...)
139 140 * see <sys/sem.h>
140 141 */
141 142 #define SYS_ioctl 54
142 143 #define SYS_uadmin 55
143 144 #define SYS_fchownat 56
144 145 #define SYS_utssys 57
145 146 /*
146 147 * subcodes (third argument):
147 148 * uname(obuf) (obsolete) :: syscall(57, obuf, ign, 0)
148 149 * subcode 1 unused
149 150 * ustat(dev, obuf) :: syscall(57, obuf, dev, 2)
150 151 * fusers(path, flags, obuf) :: syscall(57, path, flags, 3, obuf)
151 152 * see <sys/utssys.h>
152 153 */
153 154 #define SYS_fdsync 58
154 155 #define SYS_execve 59
155 156 #define SYS_umask 60
156 157 #define SYS_chroot 61
157 158 #define SYS_fcntl 62
158 159 #define SYS_ulimit 63
159 160 #define SYS_renameat 64
160 161 #define SYS_unlinkat 65
161 162 #define SYS_fstatat 66
162 163 #define SYS_fstatat64 67
163 164 #define SYS_openat 68
164 165 #define SYS_openat64 69
165 166 #define SYS_tasksys 70
166 167 /*
167 168 * subcodes:
168 169 * settaskid(...) :: tasksys(0, ...)
169 170 * gettaskid(...) :: tasksys(1, ...)
170 171 * getprojid(...) :: tasksys(2, ...)
171 172 */
172 173 #define SYS_acctctl 71
173 174 #define SYS_exacctsys 72
174 175 /*
175 176 * subcodes:
176 177 * getacct(...) :: exacct(0, ...)
177 178 * putacct(...) :: exacct(1, ...)
178 179 * wracct(...) :: exacct(2, ...)
179 180 */
180 181 #define SYS_getpagesizes 73
181 182 /*
182 183 * subcodes:
183 184 * getpagesizes2(...) :: getpagesizes(0, ...)
184 185 * getpagesizes(...) :: getpagesizes(1, ...) legacy
185 186 */
186 187 #define SYS_rctlsys 74
187 188 /*
188 189 * subcodes:
189 190 * getrctl(...) :: rctlsys(0, ...)
190 191 * setrctl(...) :: rctlsys(1, ...)
191 192 * rctllist(...) :: rctlsys(2, ...)
192 193 * rctlctl(...) :: rctlsys(3, ...)
193 194 */
194 195 #define SYS_sidsys 75
195 196 /*
196 197 * subcodes:
197 198 * allocids(...) :: sidsys(0, ...)
198 199 * idmap_reg(...) :: sidsys(1, ...)
199 200 * idmap_unreg(...) :: sidsys(2, ...)
200 201 */
201 202 #define SYS_lwp_park 77
202 203 /*
203 204 * subcodes:
204 205 * _lwp_park(timespec_t *, lwpid_t) :: syslwp_park(0, ...)
205 206 * _lwp_unpark(lwpid_t, int) :: syslwp_park(1, ...)
206 207 * _lwp_unpark_all(lwpid_t *, int) :: syslwp_park(2, ...)
207 208 * _lwp_unpark_cancel(lwpid_t *, int) :: syslwp_park(3, ...)
208 209 * _lwp_set_park(lwpid_t *, int) :: syslwp_park(4, ...)
209 210 */
210 211 #define SYS_sendfilev 78
211 212 /*
212 213 * subcodes :
213 214 * sendfilev() :: sendfilev(0, ...)
214 215 * sendfilev64() :: sendfilev(1, ...)
215 216 */
216 217 #define SYS_rmdir 79
217 218 #define SYS_mkdir 80
218 219 #define SYS_getdents 81
219 220 #define SYS_privsys 82
220 221 /*
221 222 * subcodes:
222 223 * setppriv(...) :: privsys(0, ...)
223 224 * getppriv(...) :: privsys(1, ...)
224 225 * getimplinfo(...) :: privsys(2, ...)
225 226 * setpflags(...) :: privsys(3, ...)
226 227 * getpflags(...) :: privsys(4, ...)
227 228 * issetugid(); :: privsys(5)
228 229 */
229 230 #define SYS_ucredsys 83
230 231 /*
231 232 * subcodes:
232 233 * ucred_get(...) :: ucredsys(0, ...)
233 234 * getpeerucred(...) :: ucredsys(1, ...)
234 235 */
235 236 #define SYS_sysfs 84
236 237 /*
237 238 * subcodes:
238 239 * sysfs(code, ...)
239 240 * see <sys/fstyp.h>
240 241 */
241 242 #define SYS_getmsg 85
242 243 #define SYS_putmsg 86
243 244 #define SYS_lstat 88
244 245 #define SYS_symlink 89
245 246 #define SYS_readlink 90
246 247 #define SYS_setgroups 91
247 248 #define SYS_getgroups 92
248 249 #define SYS_fchmod 93
249 250 #define SYS_fchown 94
250 251 #define SYS_sigprocmask 95
251 252 #define SYS_sigsuspend 96
252 253 #define SYS_sigaltstack 97
253 254 #define SYS_sigaction 98
254 255 #define SYS_sigpending 99
255 256 /*
256 257 * subcodes:
257 258 * subcode 0 unused
258 259 * sigpending(...) :: syscall(99, 1, ...)
259 260 * sigfillset(...) :: syscall(99, 2, ...)
260 261 */
261 262 #define SYS_context 100
262 263 /*
263 264 * subcodes:
264 265 * getcontext(...) :: syscall(100, 0, ...)
265 266 * setcontext(...) :: syscall(100, 1, ...)
266 267 */
267 268 #define SYS_fchmodat 101
268 269 #define SYS_mkdirat 102
269 270 #define SYS_statvfs 103
270 271 #define SYS_fstatvfs 104
271 272 #define SYS_getloadavg 105
272 273 #define SYS_nfssys 106
273 274 #define SYS_waitid 107
274 275 #define SYS_waitsys SYS_waitid /* historical */
275 276 #define SYS_sigsendsys 108
276 277 #define SYS_hrtsys 109
277 278 #define SYS_utimesys 110
278 279 /*
279 280 * subcodes:
280 281 * futimens(...) :: syscall(110, 0, ...)
281 282 * utimensat(...) :: syscall(110, 1, ...)
282 283 */
283 284 #define SYS_sigresend 111
284 285 #define SYS_priocntlsys 112
285 286 #define SYS_pathconf 113
286 287 #define SYS_mincore 114
287 288 #define SYS_mmap 115
288 289 #define SYS_mprotect 116
289 290 #define SYS_munmap 117
290 291 #define SYS_fpathconf 118
291 292 #define SYS_vfork 119
292 293 #define SYS_fchdir 120
293 294 #define SYS_readv 121
294 295 #define SYS_writev 122
295 296 #define SYS_mmapobj 127
296 297 #define SYS_setrlimit 128
297 298 #define SYS_getrlimit 129
298 299 #define SYS_lchown 130
299 300 #define SYS_memcntl 131
300 301 #define SYS_getpmsg 132
301 302 #define SYS_putpmsg 133
302 303 #define SYS_rename 134
303 304 #define SYS_uname 135
304 305 #define SYS_setegid 136
305 306 #define SYS_sysconfig 137
306 307 #define SYS_adjtime 138
307 308 #define SYS_systeminfo 139
308 309 #define SYS_sharefs 140
309 310 #define SYS_seteuid 141
310 311 #define SYS_forksys 142
311 312 /*
312 313 * subcodes:
313 314 * forkx(flags) :: forksys(0, flags)
314 315 * forkallx(flags) :: forksys(1, flags)
315 316 * vforkx(flags) :: forksys(2, flags)
316 317 */
317 318 #define SYS_sigtimedwait 144
318 319 #define SYS_lwp_info 145
319 320 #define SYS_yield 146
320 321 #define SYS_lwp_sema_post 148
321 322 #define SYS_lwp_sema_trywait 149
322 323 #define SYS_lwp_detach 150
323 324 #define SYS_corectl 151
324 325 #define SYS_modctl 152
325 326 #define SYS_fchroot 153
326 327 #define SYS_vhangup 155
327 328 #define SYS_gettimeofday 156
328 329 #define SYS_getitimer 157
329 330 #define SYS_setitimer 158
330 331 #define SYS_lwp_create 159
331 332 #define SYS_lwp_exit 160
332 333 #define SYS_lwp_suspend 161
333 334 #define SYS_lwp_continue 162
334 335 #define SYS_lwp_kill 163
335 336 #define SYS_lwp_self 164
336 337 #define SYS_lwp_sigmask 165
337 338 #define SYS_lwp_private 166
338 339 #define SYS_lwp_wait 167
339 340 #define SYS_lwp_mutex_wakeup 168
340 341 #define SYS_lwp_cond_wait 170
341 342 #define SYS_lwp_cond_signal 171
342 343 #define SYS_lwp_cond_broadcast 172
343 344 #define SYS_pread 173
344 345 #define SYS_pwrite 174
345 346 #define SYS_llseek 175
346 347 #define SYS_inst_sync 176
347 348 #define SYS_brand 177
348 349 #define SYS_kaio 178
349 350 /*
350 351 * subcodes:
351 352 * aioread(...) :: kaio(AIOREAD, ...)
352 353 * aiowrite(...) :: kaio(AIOWRITE, ...)
353 354 * aiowait(...) :: kaio(AIOWAIT, ...)
354 355 * aiocancel(...) :: kaio(AIOCANCEL, ...)
355 356 * aionotify() :: kaio(AIONOTIFY)
356 357 * aioinit() :: kaio(AIOINIT)
357 358 * aiostart() :: kaio(AIOSTART)
358 359 * see <sys/aio.h>
359 360 */
360 361 #define SYS_cpc 179
361 362 #define SYS_lgrpsys 180
362 363 #define SYS_meminfosys SYS_lgrpsys
363 364 /*
364 365 * subcodes:
365 366 * meminfo(...) :: meminfosys(MISYS_MEMINFO, ...)
366 367 */
367 368 #define SYS_rusagesys 181
368 369 /*
369 370 * subcodes:
370 371 * getrusage(...) :: rusagesys(RUSAGESYS_GETRUSAGE, ...)
371 372 * getvmusage(...) :: rusagesys(RUSAGESYS_GETVMUSAGE, ...)
372 373 */
373 374 #define SYS_port 182
374 375 /*
375 376 * subcodes:
376 377 * port_create(...) :: portfs(PORT_CREATE, ...)
377 378 * port_associate(...) :: portfs(PORT_ASSOCIATE, ...)
378 379 * port_dissociate(...) :: portfs(PORT_DISSOCIATE, ...)
379 380 * port_send(...) :: portfs(PORT_SEND, ...)
380 381 * port_sendn(...) :: portfs(PORT_SENDN, ...)
381 382 * port_get(...) :: portfs(PORT_GET, ...)
382 383 * port_getn(...) :: portfs(PORT_GETN, ...)
383 384 * port_alert(...) :: portfs(PORT_ALERT, ...)
384 385 * port_dispatch(...) :: portfs(PORT_DISPATCH, ...)
385 386 */
386 387 #define SYS_pollsys 183
387 388 #define SYS_labelsys 184
388 389 #define SYS_acl 185
389 390 #define SYS_auditsys 186
390 391 #define SYS_processor_bind 187
391 392 #define SYS_processor_info 188
392 393 #define SYS_p_online 189
393 394 #define SYS_sigqueue 190
394 395 #define SYS_clock_gettime 191
395 396 #define SYS_clock_settime 192
396 397 #define SYS_clock_getres 193
397 398 #define SYS_timer_create 194
398 399 #define SYS_timer_delete 195
399 400 #define SYS_timer_settime 196
400 401 #define SYS_timer_gettime 197
401 402 #define SYS_timer_getoverrun 198
402 403 #define SYS_nanosleep 199
403 404 #define SYS_facl 200
404 405 #define SYS_door 201
405 406 /*
406 407 * Door Subcodes:
407 408 * 0 door_create
408 409 * 1 door_revoke
409 410 * 2 door_info
410 411 * 3 door_call
411 412 * 4 door_return
412 413 */
413 414 #define SYS_setreuid 202
414 415 #define SYS_setregid 203
415 416 #define SYS_install_utrap 204
416 417 #define SYS_signotify 205
417 418 #define SYS_schedctl 206
418 419 #define SYS_pset 207
419 420 #define SYS_sparc_utrap_install 208
420 421 #define SYS_resolvepath 209
421 422 #define SYS_lwp_mutex_timedlock 210
422 423 #define SYS_lwp_sema_timedwait 211
423 424 #define SYS_lwp_rwlock_sys 212
424 425 /*
425 426 * subcodes:
426 427 * lwp_rwlock_rdlock(...) :: syscall(212, 0, ...)
427 428 * lwp_rwlock_wrlock(...) :: syscall(212, 1, ...)
428 429 * lwp_rwlock_tryrdlock(...) :: syscall(212, 2, ...)
429 430 * lwp_rwlock_trywrlock(...) :: syscall(212, 3, ...)
430 431 * lwp_rwlock_unlock(...) :: syscall(212, 4, ...)
431 432 */
432 433 /* system calls for large file ( > 2 gigabyte) support */
433 434 #define SYS_getdents64 213
434 435 #define SYS_mmap64 214
435 436 #define SYS_stat64 215
436 437 #define SYS_lstat64 216
437 438 #define SYS_fstat64 217
438 439 #define SYS_statvfs64 218
439 440 #define SYS_fstatvfs64 219
440 441 #define SYS_setrlimit64 220
441 442 #define SYS_getrlimit64 221
442 443 #define SYS_pread64 222
443 444 #define SYS_pwrite64 223
444 445 #define SYS_open64 225
445 446 #define SYS_rpcsys 226
446 447 #define SYS_zone 227
447 448 /*
448 449 * subcodes:
449 450 * zone_create(...) :: zone(ZONE_CREATE, ...)
450 451 * zone_destroy(...) :: zone(ZONE_DESTROY, ...)
451 452 * zone_getattr(...) :: zone(ZONE_GETATTR, ...)
452 453 * zone_enter(...) :: zone(ZONE_ENTER, ...)
453 454 * zone_list(...) :: zone(ZONE_LIST, ...)
454 455 * zone_shutdown(...) :: zone(ZONE_SHUTDOWN, ...)
455 456 * zone_lookup(...) :: zone(ZONE_LOOKUP, ...)
456 457 * zone_boot(...) :: zone(ZONE_BOOT, ...)
457 458 * zone_version(...) :: zone(ZONE_VERSION, ...)
458 459 * zone_setattr(...) :: zone(ZONE_SETATTR, ...)
459 460 * zone_add_datalink(...) :: zone(ZONE_ADD_DATALINK, ...)
460 461 * zone_remove_datalink(...) :: zone(ZONE_DEL_DATALINK, ...)
461 462 * zone_check_datalink(...) :: zone(ZONE_CHECK_DATALINK, ...)
462 463 * zone_list_datalink(...) :: zone(ZONE_LIST_DATALINK, ...)
463 464 */
464 465 #define SYS_autofssys 228
465 466 #define SYS_getcwd 229
466 467 #define SYS_so_socket 230
467 468 #define SYS_so_socketpair 231
468 469 #define SYS_bind 232
469 470 #define SYS_listen 233
470 471 #define SYS_accept 234
471 472 #define SYS_connect 235
472 473 #define SYS_shutdown 236
473 474 #define SYS_recv 237
474 475 #define SYS_recvfrom 238
475 476 #define SYS_recvmsg 239
476 477 #define SYS_send 240
477 478 #define SYS_sendmsg 241
478 479 #define SYS_sendto 242
479 480 #define SYS_getpeername 243
480 481 #define SYS_getsockname 244
481 482 #define SYS_getsockopt 245
482 483 #define SYS_setsockopt 246
483 484 #define SYS_sockconfig 247
484 485 /*
485 486 * NTP codes
486 487 */
487 488 #define SYS_ntp_gettime 248
488 489 #define SYS_ntp_adjtime 249
489 490 #define SYS_lwp_mutex_unlock 250
490 491 #define SYS_lwp_mutex_trylock 251
491 492 #define SYS_lwp_mutex_register 252
492 493 #define SYS_cladm 253
493 494 #define SYS_uucopy 254
494 495 #define SYS_umount2 255
495 496
496 497 #ifndef _ASM
497 498
498 499 typedef struct { /* syscall set type */
↓ open down ↓ |
466 lines elided |
↑ open up ↑ |
499 500 unsigned int word[16];
500 501 } sysset_t;
501 502
502 503 typedef struct { /* return values from system call */
503 504 long sys_rval1; /* primary return value from system call */
504 505 long sys_rval2; /* second return value from system call */
505 506 } sysret_t;
506 507
507 508 #if !defined(_KERNEL)
508 509
509 -#if defined(__STDC__)
510 510 extern int syscall(int, ...);
511 511 extern int __systemcall(sysret_t *, int, ...);
512 512 extern int __set_errno(int);
513 -#else
514 -extern int syscall();
515 -extern int __systemcall();
516 -extern int __set_errno();
517 -#endif
518 513
519 514 #endif /* _KERNEL */
520 515
521 516 #endif /* _ASM */
522 517
523 518 #ifdef __cplusplus
524 519 }
525 520 #endif
526 521
527 522 #endif /* _SYS_SYSCALL_H */
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX