4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21
22 /*
23 * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
24 */
25
26 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
27 /* All Rights Reserved */
28
29 #ifndef _SYS_SYSCALL_H
30 #define _SYS_SYSCALL_H
31
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35
36 /*
37 * system call numbers
38 * syscall(SYS_xxxx, ...)
39 */
40
41 /* syscall enumeration MUST begin with 1 */
42
43 /*
481 #define SYS_setsockopt 246
482 #define SYS_sockconfig 247
483 /*
484 * NTP codes
485 */
486 #define SYS_ntp_gettime 248
487 #define SYS_ntp_adjtime 249
488 #define SYS_lwp_mutex_unlock 250
489 #define SYS_lwp_mutex_trylock 251
490 #define SYS_lwp_mutex_register 252
491 #define SYS_cladm 253
492 #define SYS_uucopy 254
493 #define SYS_umount2 255
494
495 #ifndef _ASM
496
497 typedef struct { /* syscall set type */
498 unsigned int word[16];
499 } sysset_t;
500
501 #if !defined(_KERNEL)
502
503 typedef struct { /* return values from system call */
504 long sys_rval1; /* primary return value from system call */
505 long sys_rval2; /* second return value from system call */
506 } sysret_t;
507
508 #if defined(__STDC__)
509 extern int syscall(int, ...);
510 extern int __systemcall(sysret_t *, int, ...);
511 extern int __set_errno(int);
512 #else
513 extern int syscall();
514 extern int __systemcall();
515 extern int __set_errno();
516 #endif
517
518 #endif /* _KERNEL */
519
520 #endif /* _ASM */
521
522 #ifdef __cplusplus
523 }
524 #endif
525
526 #endif /* _SYS_SYSCALL_H */
|
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21
22 /*
23 * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
24 * Copyright (c) 2013 by Delphix. All rights reserved.
25 */
26
27 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
28 /* All Rights Reserved */
29
30 #ifndef _SYS_SYSCALL_H
31 #define _SYS_SYSCALL_H
32
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36
37 /*
38 * system call numbers
39 * syscall(SYS_xxxx, ...)
40 */
41
42 /* syscall enumeration MUST begin with 1 */
43
44 /*
482 #define SYS_setsockopt 246
483 #define SYS_sockconfig 247
484 /*
485 * NTP codes
486 */
487 #define SYS_ntp_gettime 248
488 #define SYS_ntp_adjtime 249
489 #define SYS_lwp_mutex_unlock 250
490 #define SYS_lwp_mutex_trylock 251
491 #define SYS_lwp_mutex_register 252
492 #define SYS_cladm 253
493 #define SYS_uucopy 254
494 #define SYS_umount2 255
495
496 #ifndef _ASM
497
498 typedef struct { /* syscall set type */
499 unsigned int word[16];
500 } sysset_t;
501
502 typedef struct { /* return values from system call */
503 long sys_rval1; /* primary return value from system call */
504 long sys_rval2; /* second return value from system call */
505 } sysret_t;
506
507 #if !defined(_KERNEL)
508
509 #if defined(__STDC__)
510 extern int syscall(int, ...);
511 extern int __systemcall(sysret_t *, int, ...);
512 extern int __set_errno(int);
513 #else
514 extern int syscall();
515 extern int __systemcall();
516 extern int __set_errno();
517 #endif
518
519 #endif /* _KERNEL */
520
521 #endif /* _ASM */
522
523 #ifdef __cplusplus
524 }
525 #endif
526
527 #endif /* _SYS_SYSCALL_H */
|