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.32 2003/12/23 04:07:22 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_select_args { 61 char nd_l_[PADL_(int)]; int nd; char nd_r_[PADR_(int)]; 62 char in_l_[PADL_(fd_set *)]; fd_set * in; char in_r_[PADR_(fd_set *)]; 63 char ou_l_[PADL_(fd_set *)]; fd_set * ou; char ou_r_[PADR_(fd_set *)]; 64 char ex_l_[PADL_(fd_set *)]; fd_set * ex; char ex_r_[PADR_(fd_set *)]; 65 char tv_l_[PADL_(struct timeval32 *)]; struct timeval32 * tv; char tv_r_[PADR_(struct timeval32 *)]; 66 }; 67 struct freebsd32_gettimeofday_args { 68 char tp_l_[PADL_(struct timeval32 *)]; struct timeval32 * tp; char tp_r_[PADR_(struct timeval32 *)]; 69 char tzp_l_[PADL_(struct timezone *)]; struct timezone * tzp; char tzp_r_[PADR_(struct timezone *)]; 70 }; 71 struct freebsd32_getrusage_args { 72 char who_l_[PADL_(int)]; int who; char who_r_[PADR_(int)]; 73 char rusage_l_[PADL_(struct rusage32 *)]; struct rusage32 * rusage; char rusage_r_[PADR_(struct rusage32 *)]; 74 }; 75 struct freebsd32_readv_args { 76 char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; 77 char iovp_l_[PADL_(struct iovec32 *)]; struct iovec32 * iovp; char iovp_r_[PADR_(struct iovec32 *)]; 78 char iovcnt_l_[PADL_(u_int)]; u_int iovcnt; char iovcnt_r_[PADR_(u_int)]; 79 }; 80 struct freebsd32_writev_args { 81 char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; 82 char iovp_l_[PADL_(struct iovec32 *)]; struct iovec32 * iovp; char iovp_r_[PADR_(struct iovec32 *)]; 83 char iovcnt_l_[PADL_(u_int)]; u_int iovcnt; char iovcnt_r_[PADR_(u_int)]; 84 }; 85 struct freebsd32_settimeofday_args { 86 char tv_l_[PADL_(struct timeval32 *)]; struct timeval32 * tv; char tv_r_[PADR_(struct timeval32 *)]; 87 char tzp_l_[PADL_(struct timezone *)]; struct timezone * tzp; char tzp_r_[PADR_(struct timezone *)]; 88 }; 89 struct freebsd32_utimes_args { 90 char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; 91 char tptr_l_[PADL_(struct timeval32 *)]; struct timeval32 * tptr; char tptr_r_[PADR_(struct timeval32 *)]; 92 }; 93 struct freebsd32_adjtime_args { 94 char delta_l_[PADL_(struct timeval32 *)]; struct timeval32 * delta; char delta_r_[PADR_(struct timeval32 *)]; 95 char olddelta_l_[PADL_(struct timeval32 *)]; struct timeval32 * olddelta; char olddelta_r_[PADR_(struct timeval32 *)]; 96 }; 97 struct freebsd32_statfs_args { 98 char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; 99 char buf_l_[PADL_(struct statfs32 *)]; struct statfs32 * buf; char buf_r_[PADR_(struct statfs32 *)]; 100 }; 101 struct freebsd32_fstatfs_args { 102 char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; 103 char buf_l_[PADL_(struct statfs32 *)]; struct statfs32 * buf; char buf_r_[PADR_(struct statfs32 *)]; 104 }; 105 struct freebsd32_semsys_args { 106 char which_l_[PADL_(int)]; int which; char which_r_[PADR_(int)]; 107 char a2_l_[PADL_(int)]; int a2; char a2_r_[PADR_(int)]; 108 char a3_l_[PADL_(int)]; int a3; char a3_r_[PADR_(int)]; 109 char a4_l_[PADL_(int)]; int a4; char a4_r_[PADR_(int)]; 110 char a5_l_[PADL_(int)]; int a5; char a5_r_[PADR_(int)]; 111 }; 112 struct freebsd32_msgsys_args { 113 char which_l_[PADL_(int)]; int which; char which_r_[PADR_(int)]; 114 char a2_l_[PADL_(int)]; int a2; char a2_r_[PADR_(int)]; 115 char a3_l_[PADL_(int)]; int a3; char a3_r_[PADR_(int)]; 116 char a4_l_[PADL_(int)]; int a4; char a4_r_[PADR_(int)]; 117 char a5_l_[PADL_(int)]; int a5; char a5_r_[PADR_(int)]; 118 char a6_l_[PADL_(int)]; int a6; char a6_r_[PADR_(int)]; 119 }; 120 struct freebsd32_shmsys_args { 121 char which_l_[PADL_(int)]; int which; char which_r_[PADR_(int)]; 122 char a2_l_[PADL_(int)]; int a2; char a2_r_[PADR_(int)]; 123 char a3_l_[PADL_(int)]; int a3; char a3_r_[PADR_(int)]; 124 char a4_l_[PADL_(int)]; int a4; char a4_r_[PADR_(int)]; 125 }; 126 struct freebsd32_pread_args { 127 char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; 128 char buf_l_[PADL_(void *)]; void * buf; char buf_r_[PADR_(void *)]; 129 char nbyte_l_[PADL_(size_t)]; size_t nbyte; char nbyte_r_[PADR_(size_t)]; 130 char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)]; 131 char offsetlo_l_[PADL_(u_int32_t)]; u_int32_t offsetlo; char offsetlo_r_[PADR_(u_int32_t)]; 132 char offsethi_l_[PADL_(u_int32_t)]; u_int32_t offsethi; char offsethi_r_[PADR_(u_int32_t)]; 133 }; 134 struct freebsd32_pwrite_args { 135 char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; 136 char buf_l_[PADL_(const void *)]; const void * buf; char buf_r_[PADR_(const void *)]; 137 char nbyte_l_[PADL_(size_t)]; size_t nbyte; char nbyte_r_[PADR_(size_t)]; 138 char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)]; 139 char offsetlo_l_[PADL_(u_int32_t)]; u_int32_t offsetlo; char offsetlo_r_[PADR_(u_int32_t)]; 140 char offsethi_l_[PADL_(u_int32_t)]; u_int32_t offsethi; char offsethi_r_[PADR_(u_int32_t)]; 141 }; 142 struct freebsd32_stat_args { 143 char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; 144 char ub_l_[PADL_(struct stat32 *)]; struct stat32 * ub; char ub_r_[PADR_(struct stat32 *)]; 145 }; 146 struct freebsd32_fstat_args { 147 char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; 148 char ub_l_[PADL_(struct stat32 *)]; struct stat32 * ub; char ub_r_[PADR_(struct stat32 *)]; 149 }; 150 struct freebsd32_lstat_args { 151 char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; 152 char ub_l_[PADL_(struct stat32 *)]; struct stat32 * ub; char ub_r_[PADR_(struct stat32 *)]; 153 }; 154 struct freebsd32_mmap_args { 155 char addr_l_[PADL_(caddr_t)]; caddr_t addr; char addr_r_[PADR_(caddr_t)]; 156 char len_l_[PADL_(size_t)]; size_t len; char len_r_[PADR_(size_t)]; 157 char prot_l_[PADL_(int)]; int prot; char prot_r_[PADR_(int)]; 158 char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; 159 char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; 160 char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)]; 161 char poslo_l_[PADL_(u_int32_t)]; u_int32_t poslo; char poslo_r_[PADR_(u_int32_t)]; 162 char poshi_l_[PADL_(u_int32_t)]; u_int32_t poshi; char poshi_r_[PADR_(u_int32_t)]; 163 }; 164 struct freebsd32_lseek_args { 165 char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; 166 char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)]; 167 char offsetlo_l_[PADL_(u_int32_t)]; u_int32_t offsetlo; char offsetlo_r_[PADR_(u_int32_t)]; 168 char offsethi_l_[PADL_(u_int32_t)]; u_int32_t offsethi; char offsethi_r_[PADR_(u_int32_t)]; 169 char whence_l_[PADL_(int)]; int whence; char whence_r_[PADR_(int)]; 170 }; 171 struct freebsd32_truncate_args { 172 char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; 173 char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)]; 174 char lengthlo_l_[PADL_(u_int32_t)]; u_int32_t lengthlo; char lengthlo_r_[PADR_(u_int32_t)]; 175 char lengthhi_l_[PADL_(u_int32_t)]; u_int32_t lengthhi; char lengthhi_r_[PADR_(u_int32_t)]; 176 }; 177 struct freebsd32_ftruncate_args { 178 char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; 179 char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)]; 180 char lengthlo_l_[PADL_(u_int32_t)]; u_int32_t lengthlo; char lengthlo_r_[PADR_(u_int32_t)]; 181 char lengthhi_l_[PADL_(u_int32_t)]; u_int32_t lengthhi; char lengthhi_r_[PADR_(u_int32_t)]; 182 }; 183 struct freebsd32_sysctl_args { 184 char name_l_[PADL_(int *)]; int * name; char name_r_[PADR_(int *)]; 185 char namelen_l_[PADL_(u_int)]; u_int namelen; char namelen_r_[PADR_(u_int)]; 186 char old_l_[PADL_(void *)]; void * old; char old_r_[PADR_(void *)]; 187 char oldlenp_l_[PADL_(u_int32_t *)]; u_int32_t * oldlenp; char oldlenp_r_[PADR_(u_int32_t *)]; 188 char new_l_[PADL_(void *)]; void * new; char new_r_[PADR_(void *)]; 189 char newlen_l_[PADL_(u_int32_t)]; u_int32_t newlen; char newlen_r_[PADR_(u_int32_t)]; 190 }; 191 struct freebsd32_kevent_args { 192 char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; 193 char changelist_l_[PADL_(const struct kevent *)]; const struct kevent * changelist; char changelist_r_[PADR_(const struct kevent *)]; 194 char nchanges_l_[PADL_(int)]; int nchanges; char nchanges_r_[PADR_(int)]; 195 char eventlist_l_[PADL_(struct kevent *)]; struct kevent * eventlist; char eventlist_r_[PADR_(struct kevent *)]; 196 char nevents_l_[PADL_(int)]; int nevents; char nevents_r_[PADR_(int)]; 197 char timeout_l_[PADL_(const struct timespec *)]; const struct timespec * timeout; char timeout_r_[PADR_(const struct timespec *)]; 198 }; 199 struct freebsd32_sendfile_args { 200 char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; 201 char s_l_[PADL_(int)]; int s; char s_r_[PADR_(int)]; 202 char offsetlo_l_[PADL_(u_int32_t)]; u_int32_t offsetlo; char offsetlo_r_[PADR_(u_int32_t)]; 203 char offsethi_l_[PADL_(u_int32_t)]; u_int32_t offsethi; char offsethi_r_[PADR_(u_int32_t)]; 204 char nbytes_l_[PADL_(size_t)]; size_t nbytes; char nbytes_r_[PADR_(size_t)]; 205 char hdtr_l_[PADL_(struct sf_hdtr *)]; struct sf_hdtr * hdtr; char hdtr_r_[PADR_(struct sf_hdtr *)]; 206 char sbytes_l_[PADL_(off_t *)]; off_t * sbytes; char sbytes_r_[PADR_(off_t *)]; 207 char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; 208 }; 209 struct freebsd32_sigaction_args { 210 char sig_l_[PADL_(int)]; int sig; char sig_r_[PADR_(int)]; 211 char act_l_[PADL_(struct sigaction32 *)]; struct sigaction32 * act; char act_r_[PADR_(struct sigaction32 *)]; 212 char oact_l_[PADL_(struct sigaction32 *)]; struct sigaction32 * oact; char oact_r_[PADR_(struct sigaction32 *)]; 213 }; 214 struct freebsd32_sigreturn_args { 215 char sigcntxp_l_[PADL_(const struct freebsd32_ucontext *)]; const struct freebsd32_ucontext * sigcntxp; char sigcntxp_r_[PADR_(const struct freebsd32_ucontext *)]; 216 }; 217 int freebsd32_wait4(struct thread *, struct freebsd32_wait4_args *); 218 int freebsd32_getfsstat(struct thread *, struct freebsd32_getfsstat_args *); 219 int freebsd32_sigaltstack(struct thread *, struct freebsd32_sigaltstack_args *); 220 int freebsd32_execve(struct thread *, struct freebsd32_execve_args *); 221 int freebsd32_setitimer(struct thread *, struct freebsd32_setitimer_args *); 222 int freebsd32_select(struct thread *, struct freebsd32_select_args *); 223 int freebsd32_gettimeofday(struct thread *, struct freebsd32_gettimeofday_args *); 224 int freebsd32_getrusage(struct thread *, struct freebsd32_getrusage_args *); 225 int freebsd32_readv(struct thread *, struct freebsd32_readv_args *); 226 int freebsd32_writev(struct thread *, struct freebsd32_writev_args *); 227 int freebsd32_settimeofday(struct thread *, struct freebsd32_settimeofday_args *); 228 int freebsd32_utimes(struct thread *, struct freebsd32_utimes_args *); 229 int freebsd32_adjtime(struct thread *, struct freebsd32_adjtime_args *); 230 int freebsd32_statfs(struct thread *, struct freebsd32_statfs_args *); 231 int freebsd32_fstatfs(struct thread *, struct freebsd32_fstatfs_args *); 232 int freebsd32_semsys(struct thread *, struct freebsd32_semsys_args *); 233 int freebsd32_msgsys(struct thread *, struct freebsd32_msgsys_args *); 234 int freebsd32_shmsys(struct thread *, struct freebsd32_shmsys_args *); 235 int freebsd32_pread(struct thread *, struct freebsd32_pread_args *); 236 int freebsd32_pwrite(struct thread *, struct freebsd32_pwrite_args *); 237 int freebsd32_stat(struct thread *, struct freebsd32_stat_args *); 238 int freebsd32_fstat(struct thread *, struct freebsd32_fstat_args *); 239 int freebsd32_lstat(struct thread *, struct freebsd32_lstat_args *); 240 int freebsd32_mmap(struct thread *, struct freebsd32_mmap_args *); 241 int freebsd32_lseek(struct thread *, struct freebsd32_lseek_args *); 242 int freebsd32_truncate(struct thread *, struct freebsd32_truncate_args *); 243 int freebsd32_ftruncate(struct thread *, struct freebsd32_ftruncate_args *); 244 int freebsd32_sysctl(struct thread *, struct freebsd32_sysctl_args *); 245 int freebsd32_kevent(struct thread *, struct freebsd32_kevent_args *); 246 int freebsd32_sendfile(struct thread *, struct freebsd32_sendfile_args *); 247 int freebsd32_sigaction(struct thread *, struct freebsd32_sigaction_args *); 248 int freebsd32_sigreturn(struct thread *, struct freebsd32_sigreturn_args *); 249 250 #ifdef COMPAT_43 251 252 253 #endif /* COMPAT_43 */ 254 255 256 #ifdef COMPAT_FREEBSD4 257 258 struct freebsd4_freebsd32_sendfile_args { 259 char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; 260 char s_l_[PADL_(int)]; int s; char s_r_[PADR_(int)]; 261 char offsetlo_l_[PADL_(u_int32_t)]; u_int32_t offsetlo; char offsetlo_r_[PADR_(u_int32_t)]; 262 char offsethi_l_[PADL_(u_int32_t)]; u_int32_t offsethi; char offsethi_r_[PADR_(u_int32_t)]; 263 char nbytes_l_[PADL_(size_t)]; size_t nbytes; char nbytes_r_[PADR_(size_t)]; 264 char hdtr_l_[PADL_(struct sf_hdtr *)]; struct sf_hdtr * hdtr; char hdtr_r_[PADR_(struct sf_hdtr *)]; 265 char sbytes_l_[PADL_(off_t *)]; off_t * sbytes; char sbytes_r_[PADR_(off_t *)]; 266 char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; 267 }; 268 struct freebsd4_freebsd32_sigaction_args { 269 char sig_l_[PADL_(int)]; int sig; char sig_r_[PADR_(int)]; 270 char act_l_[PADL_(struct sigaction32 *)]; struct sigaction32 * act; char act_r_[PADR_(struct sigaction32 *)]; 271 char oact_l_[PADL_(struct sigaction32 *)]; struct sigaction32 * oact; char oact_r_[PADR_(struct sigaction32 *)]; 272 }; 273 struct freebsd4_freebsd32_sigreturn_args { 274 char sigcntxp_l_[PADL_(const struct __ucontext *)]; const struct __ucontext * sigcntxp; char sigcntxp_r_[PADR_(const struct __ucontext *)]; 275 }; 276 int freebsd4_freebsd32_sendfile(struct thread *, struct freebsd4_freebsd32_sendfile_args *); 277 int freebsd4_freebsd32_sigaction(struct thread *, struct freebsd4_freebsd32_sigaction_args *); 278 int freebsd4_freebsd32_sigreturn(struct thread *, struct freebsd4_freebsd32_sigreturn_args *); 279 280 #endif /* COMPAT_FREEBSD4 */ 281 282 #undef PAD_ 283 #undef PADL_ 284 #undef PADR_ 285 286 #endif /* !_FREEBSD32_SYSPROTO_H_ */ 287