4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
23 ! "@(#)SYS.h 1.14 88/02/08"
24 ! Copyright (c
) 1986, 1996 by Sun Microsystems
, Inc
.
25 ! All rights reserved
.
28 #include <sys/syscall.h>
29 #include <machine/asm_linkage.h>
32 #define SV_ERESTART 91 /* ERESTART is returned by the kernel for
33 restartable system calls */
35 #define WINDOWSIZE (16*4)
45 #define BSDSYSCALL(x) \
52 * SYSREENTRY provides the entry sequence for restartable system calls.
54 #define SYSREENTRY(x) \
59 #define PSEUDO(x, y) \
65 * SYSCALL_RESTART provides the most common restartable system call sequence.
67 #define SYSCALL_RESTART(x) \
71 SYSRESTART(.restart_/**/x)
74 * SYSREENTRY provides the entry sequence for restartable system calls.
76 #define SYSREENTRY(x) \
82 * SYSRESTART provides the error handling sequence for restartable
86 #define SYSRESTART(x) \
88 cmp %o0, SV_ERESTART; \
92 ld [%o5 + .cerror], %o5; \
97 #define SYSRESTART(x) \
99 cmp %o0, SV_ERESTART; \
107 #define RET retl; nop;
110 #define CERROR(free_reg) \
112 PIC_SETUP(free_reg); \
114 ld [%free_reg+ .cerror],%free_reg; \
119 #define CERROR(free_reg) \
122 sethi %hi(.cerror), %free_reg;\
123 or %free_reg, %lo(.cerror), %free_reg;\