xref: /freebsd/sys/compat/freebsd32/freebsd32_proto.h (revision 996a568eda9ff05591e32e9b9d06dd30724c94e7)
1 /*
2  * System call prototypes.
3  *
4  * DO NOT EDIT-- this file is automatically generated.
5  * $FreeBSD$
6  * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.33 2004/01/28 23:45:37 peter Exp
7  */
8 
9 #ifndef _FREEBSD32_SYSPROTO_H_
10 #define	_FREEBSD32_SYSPROTO_H_
11 
12 #include <sys/signal.h>
13 #include <sys/acl.h>
14 #include <sys/thr.h>
15 #include <sys/umtx.h>
16 #include <posix4/_semaphore.h>
17 
18 #include <sys/ucontext.h>
19 
20 struct proc;
21 
22 struct thread;
23 
24 #define	PAD_(t)	(sizeof(register_t) <= sizeof(t) ? \
25 		0 : sizeof(register_t) - sizeof(t))
26 
27 #if BYTE_ORDER == LITTLE_ENDIAN
28 #define	PADL_(t)	0
29 #define	PADR_(t)	PAD_(t)
30 #else
31 #define	PADL_(t)	PAD_(t)
32 #define	PADR_(t)	0
33 #endif
34 
35 struct freebsd32_wait4_args {
36 	char pid_l_[PADL_(int)]; int pid; char pid_r_[PADR_(int)];
37 	char status_l_[PADL_(int *)]; int * status; char status_r_[PADR_(int *)];
38 	char options_l_[PADL_(int)]; int options; char options_r_[PADR_(int)];
39 	char rusage_l_[PADL_(struct rusage32 *)]; struct rusage32 * rusage; char rusage_r_[PADR_(struct rusage32 *)];
40 };
41 struct freebsd32_getfsstat_args {
42 	char buf_l_[PADL_(struct statfs32 *)]; struct statfs32 * buf; char buf_r_[PADR_(struct statfs32 *)];
43 	char bufsize_l_[PADL_(long)]; long bufsize; char bufsize_r_[PADR_(long)];
44 	char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)];
45 };
46 struct freebsd32_sigaltstack_args {
47 	char ss_l_[PADL_(struct sigaltstack32 *)]; struct sigaltstack32 * ss; char ss_r_[PADR_(struct sigaltstack32 *)];
48 	char oss_l_[PADL_(struct sigaltstack32 *)]; struct sigaltstack32 * oss; char oss_r_[PADR_(struct sigaltstack32 *)];
49 };
50 struct freebsd32_execve_args {
51 	char fname_l_[PADL_(char *)]; char * fname; char fname_r_[PADR_(char *)];
52 	char argv_l_[PADL_(u_int32_t *)]; u_int32_t * argv; char argv_r_[PADR_(u_int32_t *)];
53 	char envv_l_[PADL_(u_int32_t *)]; u_int32_t * envv; char envv_r_[PADR_(u_int32_t *)];
54 };
55 struct freebsd32_setitimer_args {
56 	char which_l_[PADL_(u_int)]; u_int which; char which_r_[PADR_(u_int)];
57 	char itv_l_[PADL_(struct itimerval32 *)]; struct itimerval32 * itv; char itv_r_[PADR_(struct itimerval32 *)];
58 	char oitv_l_[PADL_(struct itimerval32 *)]; struct itimerval32 * oitv; char oitv_r_[PADR_(struct itimerval32 *)];
59 };
60 struct freebsd32_getitimer_args {
61 	char which_l_[PADL_(u_int)]; u_int which; char which_r_[PADR_(u_int)];
62 	char itv_l_[PADL_(struct itimerval32 *)]; struct itimerval32 * itv; char itv_r_[PADR_(struct itimerval32 *)];
63 };
64 struct freebsd32_select_args {
65 	char nd_l_[PADL_(int)]; int nd; char nd_r_[PADR_(int)];
66 	char in_l_[PADL_(fd_set *)]; fd_set * in; char in_r_[PADR_(fd_set *)];
67 	char ou_l_[PADL_(fd_set *)]; fd_set * ou; char ou_r_[PADR_(fd_set *)];
68 	char ex_l_[PADL_(fd_set *)]; fd_set * ex; char ex_r_[PADR_(fd_set *)];
69 	char tv_l_[PADL_(struct timeval32 *)]; struct timeval32 * tv; char tv_r_[PADR_(struct timeval32 *)];
70 };
71 struct freebsd32_gettimeofday_args {
72 	char tp_l_[PADL_(struct timeval32 *)]; struct timeval32 * tp; char tp_r_[PADR_(struct timeval32 *)];
73 	char tzp_l_[PADL_(struct timezone *)]; struct timezone * tzp; char tzp_r_[PADR_(struct timezone *)];
74 };
75 struct freebsd32_getrusage_args {
76 	char who_l_[PADL_(int)]; int who; char who_r_[PADR_(int)];
77 	char rusage_l_[PADL_(struct rusage32 *)]; struct rusage32 * rusage; char rusage_r_[PADR_(struct rusage32 *)];
78 };
79 struct freebsd32_readv_args {
80 	char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
81 	char iovp_l_[PADL_(struct iovec32 *)]; struct iovec32 * iovp; char iovp_r_[PADR_(struct iovec32 *)];
82 	char iovcnt_l_[PADL_(u_int)]; u_int iovcnt; char iovcnt_r_[PADR_(u_int)];
83 };
84 struct freebsd32_writev_args {
85 	char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
86 	char iovp_l_[PADL_(struct iovec32 *)]; struct iovec32 * iovp; char iovp_r_[PADR_(struct iovec32 *)];
87 	char iovcnt_l_[PADL_(u_int)]; u_int iovcnt; char iovcnt_r_[PADR_(u_int)];
88 };
89 struct freebsd32_settimeofday_args {
90 	char tv_l_[PADL_(struct timeval32 *)]; struct timeval32 * tv; char tv_r_[PADR_(struct timeval32 *)];
91 	char tzp_l_[PADL_(struct timezone *)]; struct timezone * tzp; char tzp_r_[PADR_(struct timezone *)];
92 };
93 struct freebsd32_utimes_args {
94 	char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)];
95 	char tptr_l_[PADL_(struct timeval32 *)]; struct timeval32 * tptr; char tptr_r_[PADR_(struct timeval32 *)];
96 };
97 struct freebsd32_adjtime_args {
98 	char delta_l_[PADL_(struct timeval32 *)]; struct timeval32 * delta; char delta_r_[PADR_(struct timeval32 *)];
99 	char olddelta_l_[PADL_(struct timeval32 *)]; struct timeval32 * olddelta; char olddelta_r_[PADR_(struct timeval32 *)];
100 };
101 struct freebsd32_statfs_args {
102 	char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)];
103 	char buf_l_[PADL_(struct statfs32 *)]; struct statfs32 * buf; char buf_r_[PADR_(struct statfs32 *)];
104 };
105 struct freebsd32_fstatfs_args {
106 	char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
107 	char buf_l_[PADL_(struct statfs32 *)]; struct statfs32 * buf; char buf_r_[PADR_(struct statfs32 *)];
108 };
109 struct freebsd32_semsys_args {
110 	char which_l_[PADL_(int)]; int which; char which_r_[PADR_(int)];
111 	char a2_l_[PADL_(int)]; int a2; char a2_r_[PADR_(int)];
112 	char a3_l_[PADL_(int)]; int a3; char a3_r_[PADR_(int)];
113 	char a4_l_[PADL_(int)]; int a4; char a4_r_[PADR_(int)];
114 	char a5_l_[PADL_(int)]; int a5; char a5_r_[PADR_(int)];
115 };
116 struct freebsd32_msgsys_args {
117 	char which_l_[PADL_(int)]; int which; char which_r_[PADR_(int)];
118 	char a2_l_[PADL_(int)]; int a2; char a2_r_[PADR_(int)];
119 	char a3_l_[PADL_(int)]; int a3; char a3_r_[PADR_(int)];
120 	char a4_l_[PADL_(int)]; int a4; char a4_r_[PADR_(int)];
121 	char a5_l_[PADL_(int)]; int a5; char a5_r_[PADR_(int)];
122 	char a6_l_[PADL_(int)]; int a6; char a6_r_[PADR_(int)];
123 };
124 struct freebsd32_shmsys_args {
125 	char which_l_[PADL_(int)]; int which; char which_r_[PADR_(int)];
126 	char a2_l_[PADL_(int)]; int a2; char a2_r_[PADR_(int)];
127 	char a3_l_[PADL_(int)]; int a3; char a3_r_[PADR_(int)];
128 	char a4_l_[PADL_(int)]; int a4; char a4_r_[PADR_(int)];
129 };
130 struct freebsd32_pread_args {
131 	char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
132 	char buf_l_[PADL_(void *)]; void * buf; char buf_r_[PADR_(void *)];
133 	char nbyte_l_[PADL_(size_t)]; size_t nbyte; char nbyte_r_[PADR_(size_t)];
134 	char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)];
135 	char offsetlo_l_[PADL_(u_int32_t)]; u_int32_t offsetlo; char offsetlo_r_[PADR_(u_int32_t)];
136 	char offsethi_l_[PADL_(u_int32_t)]; u_int32_t offsethi; char offsethi_r_[PADR_(u_int32_t)];
137 };
138 struct freebsd32_pwrite_args {
139 	char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
140 	char buf_l_[PADL_(const void *)]; const void * buf; char buf_r_[PADR_(const void *)];
141 	char nbyte_l_[PADL_(size_t)]; size_t nbyte; char nbyte_r_[PADR_(size_t)];
142 	char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)];
143 	char offsetlo_l_[PADL_(u_int32_t)]; u_int32_t offsetlo; char offsetlo_r_[PADR_(u_int32_t)];
144 	char offsethi_l_[PADL_(u_int32_t)]; u_int32_t offsethi; char offsethi_r_[PADR_(u_int32_t)];
145 };
146 struct freebsd32_stat_args {
147 	char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)];
148 	char ub_l_[PADL_(struct stat32 *)]; struct stat32 * ub; char ub_r_[PADR_(struct stat32 *)];
149 };
150 struct freebsd32_fstat_args {
151 	char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
152 	char ub_l_[PADL_(struct stat32 *)]; struct stat32 * ub; char ub_r_[PADR_(struct stat32 *)];
153 };
154 struct freebsd32_lstat_args {
155 	char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)];
156 	char ub_l_[PADL_(struct stat32 *)]; struct stat32 * ub; char ub_r_[PADR_(struct stat32 *)];
157 };
158 struct freebsd32_mmap_args {
159 	char addr_l_[PADL_(caddr_t)]; caddr_t addr; char addr_r_[PADR_(caddr_t)];
160 	char len_l_[PADL_(size_t)]; size_t len; char len_r_[PADR_(size_t)];
161 	char prot_l_[PADL_(int)]; int prot; char prot_r_[PADR_(int)];
162 	char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)];
163 	char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
164 	char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)];
165 	char poslo_l_[PADL_(u_int32_t)]; u_int32_t poslo; char poslo_r_[PADR_(u_int32_t)];
166 	char poshi_l_[PADL_(u_int32_t)]; u_int32_t poshi; char poshi_r_[PADR_(u_int32_t)];
167 };
168 struct freebsd32_lseek_args {
169 	char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
170 	char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)];
171 	char offsetlo_l_[PADL_(u_int32_t)]; u_int32_t offsetlo; char offsetlo_r_[PADR_(u_int32_t)];
172 	char offsethi_l_[PADL_(u_int32_t)]; u_int32_t offsethi; char offsethi_r_[PADR_(u_int32_t)];
173 	char whence_l_[PADL_(int)]; int whence; char whence_r_[PADR_(int)];
174 };
175 struct freebsd32_truncate_args {
176 	char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)];
177 	char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)];
178 	char lengthlo_l_[PADL_(u_int32_t)]; u_int32_t lengthlo; char lengthlo_r_[PADR_(u_int32_t)];
179 	char lengthhi_l_[PADL_(u_int32_t)]; u_int32_t lengthhi; char lengthhi_r_[PADR_(u_int32_t)];
180 };
181 struct freebsd32_ftruncate_args {
182 	char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
183 	char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)];
184 	char lengthlo_l_[PADL_(u_int32_t)]; u_int32_t lengthlo; char lengthlo_r_[PADR_(u_int32_t)];
185 	char lengthhi_l_[PADL_(u_int32_t)]; u_int32_t lengthhi; char lengthhi_r_[PADR_(u_int32_t)];
186 };
187 struct freebsd32_sysctl_args {
188 	char name_l_[PADL_(int *)]; int * name; char name_r_[PADR_(int *)];
189 	char namelen_l_[PADL_(u_int)]; u_int namelen; char namelen_r_[PADR_(u_int)];
190 	char old_l_[PADL_(void *)]; void * old; char old_r_[PADR_(void *)];
191 	char oldlenp_l_[PADL_(u_int32_t *)]; u_int32_t * oldlenp; char oldlenp_r_[PADR_(u_int32_t *)];
192 	char new_l_[PADL_(void *)]; void * new; char new_r_[PADR_(void *)];
193 	char newlen_l_[PADL_(u_int32_t)]; u_int32_t newlen; char newlen_r_[PADR_(u_int32_t)];
194 };
195 struct freebsd32_kevent_args {
196 	char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
197 	char changelist_l_[PADL_(const struct kevent *)]; const struct kevent * changelist; char changelist_r_[PADR_(const struct kevent *)];
198 	char nchanges_l_[PADL_(int)]; int nchanges; char nchanges_r_[PADR_(int)];
199 	char eventlist_l_[PADL_(struct kevent *)]; struct kevent * eventlist; char eventlist_r_[PADR_(struct kevent *)];
200 	char nevents_l_[PADL_(int)]; int nevents; char nevents_r_[PADR_(int)];
201 	char timeout_l_[PADL_(const struct timespec *)]; const struct timespec * timeout; char timeout_r_[PADR_(const struct timespec *)];
202 };
203 struct freebsd32_sendfile_args {
204 	char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
205 	char s_l_[PADL_(int)]; int s; char s_r_[PADR_(int)];
206 	char offsetlo_l_[PADL_(u_int32_t)]; u_int32_t offsetlo; char offsetlo_r_[PADR_(u_int32_t)];
207 	char offsethi_l_[PADL_(u_int32_t)]; u_int32_t offsethi; char offsethi_r_[PADR_(u_int32_t)];
208 	char nbytes_l_[PADL_(size_t)]; size_t nbytes; char nbytes_r_[PADR_(size_t)];
209 	char hdtr_l_[PADL_(struct sf_hdtr *)]; struct sf_hdtr * hdtr; char hdtr_r_[PADR_(struct sf_hdtr *)];
210 	char sbytes_l_[PADL_(off_t *)]; off_t * sbytes; char sbytes_r_[PADR_(off_t *)];
211 	char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)];
212 };
213 struct freebsd32_sigaction_args {
214 	char sig_l_[PADL_(int)]; int sig; char sig_r_[PADR_(int)];
215 	char act_l_[PADL_(struct sigaction32 *)]; struct sigaction32 * act; char act_r_[PADR_(struct sigaction32 *)];
216 	char oact_l_[PADL_(struct sigaction32 *)]; struct sigaction32 * oact; char oact_r_[PADR_(struct sigaction32 *)];
217 };
218 struct freebsd32_sigreturn_args {
219 	char sigcntxp_l_[PADL_(const struct freebsd32_ucontext *)]; const struct freebsd32_ucontext * sigcntxp; char sigcntxp_r_[PADR_(const struct freebsd32_ucontext *)];
220 };
221 int	freebsd32_wait4(struct thread *, struct freebsd32_wait4_args *);
222 int	freebsd32_getfsstat(struct thread *, struct freebsd32_getfsstat_args *);
223 int	freebsd32_sigaltstack(struct thread *, struct freebsd32_sigaltstack_args *);
224 int	freebsd32_execve(struct thread *, struct freebsd32_execve_args *);
225 int	freebsd32_setitimer(struct thread *, struct freebsd32_setitimer_args *);
226 int	freebsd32_getitimer(struct thread *, struct freebsd32_getitimer_args *);
227 int	freebsd32_select(struct thread *, struct freebsd32_select_args *);
228 int	freebsd32_gettimeofday(struct thread *, struct freebsd32_gettimeofday_args *);
229 int	freebsd32_getrusage(struct thread *, struct freebsd32_getrusage_args *);
230 int	freebsd32_readv(struct thread *, struct freebsd32_readv_args *);
231 int	freebsd32_writev(struct thread *, struct freebsd32_writev_args *);
232 int	freebsd32_settimeofday(struct thread *, struct freebsd32_settimeofday_args *);
233 int	freebsd32_utimes(struct thread *, struct freebsd32_utimes_args *);
234 int	freebsd32_adjtime(struct thread *, struct freebsd32_adjtime_args *);
235 int	freebsd32_statfs(struct thread *, struct freebsd32_statfs_args *);
236 int	freebsd32_fstatfs(struct thread *, struct freebsd32_fstatfs_args *);
237 int	freebsd32_semsys(struct thread *, struct freebsd32_semsys_args *);
238 int	freebsd32_msgsys(struct thread *, struct freebsd32_msgsys_args *);
239 int	freebsd32_shmsys(struct thread *, struct freebsd32_shmsys_args *);
240 int	freebsd32_pread(struct thread *, struct freebsd32_pread_args *);
241 int	freebsd32_pwrite(struct thread *, struct freebsd32_pwrite_args *);
242 int	freebsd32_stat(struct thread *, struct freebsd32_stat_args *);
243 int	freebsd32_fstat(struct thread *, struct freebsd32_fstat_args *);
244 int	freebsd32_lstat(struct thread *, struct freebsd32_lstat_args *);
245 int	freebsd32_mmap(struct thread *, struct freebsd32_mmap_args *);
246 int	freebsd32_lseek(struct thread *, struct freebsd32_lseek_args *);
247 int	freebsd32_truncate(struct thread *, struct freebsd32_truncate_args *);
248 int	freebsd32_ftruncate(struct thread *, struct freebsd32_ftruncate_args *);
249 int	freebsd32_sysctl(struct thread *, struct freebsd32_sysctl_args *);
250 int	freebsd32_kevent(struct thread *, struct freebsd32_kevent_args *);
251 int	freebsd32_sendfile(struct thread *, struct freebsd32_sendfile_args *);
252 int	freebsd32_sigaction(struct thread *, struct freebsd32_sigaction_args *);
253 int	freebsd32_sigreturn(struct thread *, struct freebsd32_sigreturn_args *);
254 
255 #ifdef COMPAT_43
256 
257 
258 #endif /* COMPAT_43 */
259 
260 
261 #ifdef COMPAT_FREEBSD4
262 
263 struct freebsd4_freebsd32_sendfile_args {
264 	char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
265 	char s_l_[PADL_(int)]; int s; char s_r_[PADR_(int)];
266 	char offsetlo_l_[PADL_(u_int32_t)]; u_int32_t offsetlo; char offsetlo_r_[PADR_(u_int32_t)];
267 	char offsethi_l_[PADL_(u_int32_t)]; u_int32_t offsethi; char offsethi_r_[PADR_(u_int32_t)];
268 	char nbytes_l_[PADL_(size_t)]; size_t nbytes; char nbytes_r_[PADR_(size_t)];
269 	char hdtr_l_[PADL_(struct sf_hdtr *)]; struct sf_hdtr * hdtr; char hdtr_r_[PADR_(struct sf_hdtr *)];
270 	char sbytes_l_[PADL_(off_t *)]; off_t * sbytes; char sbytes_r_[PADR_(off_t *)];
271 	char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)];
272 };
273 struct freebsd4_freebsd32_sigaction_args {
274 	char sig_l_[PADL_(int)]; int sig; char sig_r_[PADR_(int)];
275 	char act_l_[PADL_(struct sigaction32 *)]; struct sigaction32 * act; char act_r_[PADR_(struct sigaction32 *)];
276 	char oact_l_[PADL_(struct sigaction32 *)]; struct sigaction32 * oact; char oact_r_[PADR_(struct sigaction32 *)];
277 };
278 struct freebsd4_freebsd32_sigreturn_args {
279 	char sigcntxp_l_[PADL_(const struct __ucontext *)]; const struct __ucontext * sigcntxp; char sigcntxp_r_[PADR_(const struct __ucontext *)];
280 };
281 int	freebsd4_freebsd32_sendfile(struct thread *, struct freebsd4_freebsd32_sendfile_args *);
282 int	freebsd4_freebsd32_sigaction(struct thread *, struct freebsd4_freebsd32_sigaction_args *);
283 int	freebsd4_freebsd32_sigreturn(struct thread *, struct freebsd4_freebsd32_sigreturn_args *);
284 
285 #endif /* COMPAT_FREEBSD4 */
286 
287 #undef PAD_
288 #undef PADL_
289 #undef PADR_
290 
291 #endif /* !_FREEBSD32_SYSPROTO_H_ */
292