Mega-commit for Linux emulator update.. This has been stress tested under
netscape-2.0 for Linux running all the Java stuff. The scrollbars are now
working, at least on my machine. (whew! :-)
I'm uncomfortable with the size of this commit, but it's too
inter-dependant to easily seperate out.
The main changes:
COMPAT_LINUX is *GONE*. Most of the code has been moved out of the i386
machine dependent section into the linux emulator itself. The int 0x80
syscall code was almost identical to the lcall 7,0 code and a minor tweak
allows them to both be used with the same C code. All kernels can now
just modload the lkm and it'll DTRT without having to rebuild the kernel
first. Like IBCS2, you can statically compile it in with "options LINUX".
A pile of new syscalls implemented, including getdents(), llseek(),
readv(), writev(), msync(), personality(). The Linux-ELF libraries want
to use some of these.
linux_select() now obeys Linux semantics, ie: returns the time remaining
of the timeout value rather than leaving it the original value.
Quite a few bugs removed, including incorrect arguments being used in
syscalls.. eg: mixups between passing the sigset as an int, vs passing
it as a pointer and doing a copyin(), missing return values, unhandled
cases, SIOC* ioctls, etc.
The build for the code has changed. i386/conf/files now knows how
to build linux_genassym and generate linux_assym.h on the fly.
Supporting changes elsewhere in the kernel:
The user-mode signal trampoline has moved from the U area to immediately
below the top of the stack (below PS_STRINGS). This allows the different
binary emulations to have their own signal trampoline code (which gets rid
of the hardwired syscall 103 (sigreturn on BSD, syslog on Linux)) and so
that the emulator can provide the exact "struct sigcontext *" argument to
the program's signal handlers.
The sigstack's "ss_flags" now uses SS_DISABLE and SS_ONSTACK flags, which
have the same values as the re-used SA_DISABLE and SA_ONSTACK which are
intended for sigaction only. This enables the support of a SA_RESETHAND
flag to sigaction to implement the gross SYSV and Linux SA_ONESHOT signal
semantics where the signal handler is reset when it's triggered.
makesyscalls.sh no longer appends the struct sysentvec on the end of the
generated init_sysent.c code. It's a lot saner to have it in a seperate
file rather than trying to update the structure inside the awk script. :-)
At exec time, the dozen bytes or so of signal trampoline code are copied
to the top of the user's stack, rather than obtaining the trampoline code
the old way by getting a clone of the parent's user area. This allows
Linux and native binaries to freely exec each other without getting
trampolines mixed up.
1996-03-02 19:38:20 +00:00
|
|
|
/*
|
|
|
|
* System call prototypes.
|
|
|
|
*
|
|
|
|
* DO NOT EDIT-- this file is automatically generated.
|
1997-12-17 03:16:11 +00:00
|
|
|
* created from Id: syscalls.master,v 1.6 1997/12/17 03:12:35 kato Exp
|
Mega-commit for Linux emulator update.. This has been stress tested under
netscape-2.0 for Linux running all the Java stuff. The scrollbars are now
working, at least on my machine. (whew! :-)
I'm uncomfortable with the size of this commit, but it's too
inter-dependant to easily seperate out.
The main changes:
COMPAT_LINUX is *GONE*. Most of the code has been moved out of the i386
machine dependent section into the linux emulator itself. The int 0x80
syscall code was almost identical to the lcall 7,0 code and a minor tweak
allows them to both be used with the same C code. All kernels can now
just modload the lkm and it'll DTRT without having to rebuild the kernel
first. Like IBCS2, you can statically compile it in with "options LINUX".
A pile of new syscalls implemented, including getdents(), llseek(),
readv(), writev(), msync(), personality(). The Linux-ELF libraries want
to use some of these.
linux_select() now obeys Linux semantics, ie: returns the time remaining
of the timeout value rather than leaving it the original value.
Quite a few bugs removed, including incorrect arguments being used in
syscalls.. eg: mixups between passing the sigset as an int, vs passing
it as a pointer and doing a copyin(), missing return values, unhandled
cases, SIOC* ioctls, etc.
The build for the code has changed. i386/conf/files now knows how
to build linux_genassym and generate linux_assym.h on the fly.
Supporting changes elsewhere in the kernel:
The user-mode signal trampoline has moved from the U area to immediately
below the top of the stack (below PS_STRINGS). This allows the different
binary emulations to have their own signal trampoline code (which gets rid
of the hardwired syscall 103 (sigreturn on BSD, syslog on Linux)) and so
that the emulator can provide the exact "struct sigcontext *" argument to
the program's signal handlers.
The sigstack's "ss_flags" now uses SS_DISABLE and SS_ONSTACK flags, which
have the same values as the re-used SA_DISABLE and SA_ONSTACK which are
intended for sigaction only. This enables the support of a SA_RESETHAND
flag to sigaction to implement the gross SYSV and Linux SA_ONESHOT signal
semantics where the signal handler is reset when it's triggered.
makesyscalls.sh no longer appends the struct sysentvec on the end of the
generated init_sysent.c code. It's a lot saner to have it in a seperate
file rather than trying to update the structure inside the awk script. :-)
At exec time, the dozen bytes or so of signal trampoline code are copied
to the top of the user's stack, rather than obtaining the trampoline code
the old way by getting a clone of the parent's user area. This allows
Linux and native binaries to freely exec each other without getting
trampolines mixed up.
1996-03-02 19:38:20 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _LINUX_SYSPROTO_H_
|
|
|
|
#define _LINUX_SYSPROTO_H_
|
|
|
|
|
1997-03-29 13:12:46 +00:00
|
|
|
#include <sys/signal.h>
|
Mega-commit for Linux emulator update.. This has been stress tested under
netscape-2.0 for Linux running all the Java stuff. The scrollbars are now
working, at least on my machine. (whew! :-)
I'm uncomfortable with the size of this commit, but it's too
inter-dependant to easily seperate out.
The main changes:
COMPAT_LINUX is *GONE*. Most of the code has been moved out of the i386
machine dependent section into the linux emulator itself. The int 0x80
syscall code was almost identical to the lcall 7,0 code and a minor tweak
allows them to both be used with the same C code. All kernels can now
just modload the lkm and it'll DTRT without having to rebuild the kernel
first. Like IBCS2, you can statically compile it in with "options LINUX".
A pile of new syscalls implemented, including getdents(), llseek(),
readv(), writev(), msync(), personality(). The Linux-ELF libraries want
to use some of these.
linux_select() now obeys Linux semantics, ie: returns the time remaining
of the timeout value rather than leaving it the original value.
Quite a few bugs removed, including incorrect arguments being used in
syscalls.. eg: mixups between passing the sigset as an int, vs passing
it as a pointer and doing a copyin(), missing return values, unhandled
cases, SIOC* ioctls, etc.
The build for the code has changed. i386/conf/files now knows how
to build linux_genassym and generate linux_assym.h on the fly.
Supporting changes elsewhere in the kernel:
The user-mode signal trampoline has moved from the U area to immediately
below the top of the stack (below PS_STRINGS). This allows the different
binary emulations to have their own signal trampoline code (which gets rid
of the hardwired syscall 103 (sigreturn on BSD, syslog on Linux)) and so
that the emulator can provide the exact "struct sigcontext *" argument to
the program's signal handlers.
The sigstack's "ss_flags" now uses SS_DISABLE and SS_ONSTACK flags, which
have the same values as the re-used SA_DISABLE and SA_ONSTACK which are
intended for sigaction only. This enables the support of a SA_RESETHAND
flag to sigaction to implement the gross SYSV and Linux SA_ONESHOT signal
semantics where the signal handler is reset when it's triggered.
makesyscalls.sh no longer appends the struct sysentvec on the end of the
generated init_sysent.c code. It's a lot saner to have it in a seperate
file rather than trying to update the structure inside the awk script. :-)
At exec time, the dozen bytes or so of signal trampoline code are copied
to the top of the user's stack, rather than obtaining the trampoline code
the old way by getting a clone of the parent's user area. This allows
Linux and native binaries to freely exec each other without getting
trampolines mixed up.
1996-03-02 19:38:20 +00:00
|
|
|
|
1998-03-28 11:51:01 +00:00
|
|
|
struct proc;
|
|
|
|
|
Mega-commit for Linux emulator update.. This has been stress tested under
netscape-2.0 for Linux running all the Java stuff. The scrollbars are now
working, at least on my machine. (whew! :-)
I'm uncomfortable with the size of this commit, but it's too
inter-dependant to easily seperate out.
The main changes:
COMPAT_LINUX is *GONE*. Most of the code has been moved out of the i386
machine dependent section into the linux emulator itself. The int 0x80
syscall code was almost identical to the lcall 7,0 code and a minor tweak
allows them to both be used with the same C code. All kernels can now
just modload the lkm and it'll DTRT without having to rebuild the kernel
first. Like IBCS2, you can statically compile it in with "options LINUX".
A pile of new syscalls implemented, including getdents(), llseek(),
readv(), writev(), msync(), personality(). The Linux-ELF libraries want
to use some of these.
linux_select() now obeys Linux semantics, ie: returns the time remaining
of the timeout value rather than leaving it the original value.
Quite a few bugs removed, including incorrect arguments being used in
syscalls.. eg: mixups between passing the sigset as an int, vs passing
it as a pointer and doing a copyin(), missing return values, unhandled
cases, SIOC* ioctls, etc.
The build for the code has changed. i386/conf/files now knows how
to build linux_genassym and generate linux_assym.h on the fly.
Supporting changes elsewhere in the kernel:
The user-mode signal trampoline has moved from the U area to immediately
below the top of the stack (below PS_STRINGS). This allows the different
binary emulations to have their own signal trampoline code (which gets rid
of the hardwired syscall 103 (sigreturn on BSD, syslog on Linux)) and so
that the emulator can provide the exact "struct sigcontext *" argument to
the program's signal handlers.
The sigstack's "ss_flags" now uses SS_DISABLE and SS_ONSTACK flags, which
have the same values as the re-used SA_DISABLE and SA_ONSTACK which are
intended for sigaction only. This enables the support of a SA_RESETHAND
flag to sigaction to implement the gross SYSV and Linux SA_ONESHOT signal
semantics where the signal handler is reset when it's triggered.
makesyscalls.sh no longer appends the struct sysentvec on the end of the
generated init_sysent.c code. It's a lot saner to have it in a seperate
file rather than trying to update the structure inside the awk script. :-)
At exec time, the dozen bytes or so of signal trampoline code are copied
to the top of the user's stack, rather than obtaining the trampoline code
the old way by getting a clone of the parent's user area. This allows
Linux and native binaries to freely exec each other without getting
trampolines mixed up.
1996-03-02 19:38:20 +00:00
|
|
|
struct linux_setup_args {
|
|
|
|
int dummy;
|
|
|
|
};
|
|
|
|
struct linux_fork_args {
|
|
|
|
int dummy;
|
|
|
|
};
|
|
|
|
struct linux_open_args {
|
|
|
|
char * path;
|
|
|
|
int flags;
|
|
|
|
int mode;
|
|
|
|
};
|
|
|
|
struct linux_waitpid_args {
|
|
|
|
int pid;
|
|
|
|
int * status;
|
|
|
|
int options;
|
|
|
|
};
|
|
|
|
struct linux_creat_args {
|
|
|
|
char * path;
|
|
|
|
int mode;
|
|
|
|
};
|
|
|
|
struct linux_unlink_args {
|
|
|
|
char * path;
|
|
|
|
};
|
|
|
|
struct linux_execve_args {
|
|
|
|
char * path;
|
|
|
|
char ** argp;
|
|
|
|
char ** envp;
|
|
|
|
};
|
|
|
|
struct linux_chdir_args {
|
|
|
|
char * path;
|
|
|
|
};
|
|
|
|
struct linux_time_args {
|
|
|
|
linux_time_t * tm;
|
|
|
|
};
|
|
|
|
struct linux_mknod_args {
|
|
|
|
char * path;
|
|
|
|
int mode;
|
|
|
|
int dev;
|
|
|
|
};
|
|
|
|
struct linux_chmod_args {
|
|
|
|
char * path;
|
|
|
|
int mode;
|
|
|
|
};
|
|
|
|
struct linux_chown_args {
|
|
|
|
char * path;
|
|
|
|
int uid;
|
|
|
|
int gid;
|
|
|
|
};
|
|
|
|
struct linux_break_args {
|
|
|
|
char * nsize;
|
|
|
|
};
|
|
|
|
struct linux_stat_args {
|
|
|
|
char * path;
|
|
|
|
struct ostat * up;
|
|
|
|
};
|
|
|
|
struct linux_lseek_args {
|
|
|
|
int fdes;
|
|
|
|
long off;
|
|
|
|
int whence;
|
|
|
|
};
|
|
|
|
struct linux_mount_args {
|
|
|
|
int dummy;
|
|
|
|
};
|
|
|
|
struct linux_umount_args {
|
|
|
|
int dummy;
|
|
|
|
};
|
|
|
|
struct linux_stime_args {
|
|
|
|
int dummy;
|
|
|
|
};
|
|
|
|
struct linux_ptrace_args {
|
|
|
|
int dummy;
|
|
|
|
};
|
|
|
|
struct linux_alarm_args {
|
|
|
|
unsigned int secs;
|
|
|
|
};
|
|
|
|
struct linux_fstat_args {
|
|
|
|
int fd;
|
|
|
|
struct ostat * up;
|
|
|
|
};
|
|
|
|
struct linux_pause_args {
|
|
|
|
int dummy;
|
|
|
|
};
|
|
|
|
struct linux_utime_args {
|
|
|
|
char * fname;
|
1996-03-04 21:03:11 +00:00
|
|
|
struct linux_utimbuf * times;
|
Mega-commit for Linux emulator update.. This has been stress tested under
netscape-2.0 for Linux running all the Java stuff. The scrollbars are now
working, at least on my machine. (whew! :-)
I'm uncomfortable with the size of this commit, but it's too
inter-dependant to easily seperate out.
The main changes:
COMPAT_LINUX is *GONE*. Most of the code has been moved out of the i386
machine dependent section into the linux emulator itself. The int 0x80
syscall code was almost identical to the lcall 7,0 code and a minor tweak
allows them to both be used with the same C code. All kernels can now
just modload the lkm and it'll DTRT without having to rebuild the kernel
first. Like IBCS2, you can statically compile it in with "options LINUX".
A pile of new syscalls implemented, including getdents(), llseek(),
readv(), writev(), msync(), personality(). The Linux-ELF libraries want
to use some of these.
linux_select() now obeys Linux semantics, ie: returns the time remaining
of the timeout value rather than leaving it the original value.
Quite a few bugs removed, including incorrect arguments being used in
syscalls.. eg: mixups between passing the sigset as an int, vs passing
it as a pointer and doing a copyin(), missing return values, unhandled
cases, SIOC* ioctls, etc.
The build for the code has changed. i386/conf/files now knows how
to build linux_genassym and generate linux_assym.h on the fly.
Supporting changes elsewhere in the kernel:
The user-mode signal trampoline has moved from the U area to immediately
below the top of the stack (below PS_STRINGS). This allows the different
binary emulations to have their own signal trampoline code (which gets rid
of the hardwired syscall 103 (sigreturn on BSD, syslog on Linux)) and so
that the emulator can provide the exact "struct sigcontext *" argument to
the program's signal handlers.
The sigstack's "ss_flags" now uses SS_DISABLE and SS_ONSTACK flags, which
have the same values as the re-used SA_DISABLE and SA_ONSTACK which are
intended for sigaction only. This enables the support of a SA_RESETHAND
flag to sigaction to implement the gross SYSV and Linux SA_ONESHOT signal
semantics where the signal handler is reset when it's triggered.
makesyscalls.sh no longer appends the struct sysentvec on the end of the
generated init_sysent.c code. It's a lot saner to have it in a seperate
file rather than trying to update the structure inside the awk script. :-)
At exec time, the dozen bytes or so of signal trampoline code are copied
to the top of the user's stack, rather than obtaining the trampoline code
the old way by getting a clone of the parent's user area. This allows
Linux and native binaries to freely exec each other without getting
trampolines mixed up.
1996-03-02 19:38:20 +00:00
|
|
|
};
|
|
|
|
struct linux_stty_args {
|
|
|
|
int dummy;
|
|
|
|
};
|
|
|
|
struct linux_gtty_args {
|
|
|
|
int dummy;
|
|
|
|
};
|
|
|
|
struct linux_access_args {
|
|
|
|
char * path;
|
|
|
|
int flags;
|
|
|
|
};
|
|
|
|
struct linux_nice_args {
|
1997-10-29 08:17:14 +00:00
|
|
|
int inc;
|
Mega-commit for Linux emulator update.. This has been stress tested under
netscape-2.0 for Linux running all the Java stuff. The scrollbars are now
working, at least on my machine. (whew! :-)
I'm uncomfortable with the size of this commit, but it's too
inter-dependant to easily seperate out.
The main changes:
COMPAT_LINUX is *GONE*. Most of the code has been moved out of the i386
machine dependent section into the linux emulator itself. The int 0x80
syscall code was almost identical to the lcall 7,0 code and a minor tweak
allows them to both be used with the same C code. All kernels can now
just modload the lkm and it'll DTRT without having to rebuild the kernel
first. Like IBCS2, you can statically compile it in with "options LINUX".
A pile of new syscalls implemented, including getdents(), llseek(),
readv(), writev(), msync(), personality(). The Linux-ELF libraries want
to use some of these.
linux_select() now obeys Linux semantics, ie: returns the time remaining
of the timeout value rather than leaving it the original value.
Quite a few bugs removed, including incorrect arguments being used in
syscalls.. eg: mixups between passing the sigset as an int, vs passing
it as a pointer and doing a copyin(), missing return values, unhandled
cases, SIOC* ioctls, etc.
The build for the code has changed. i386/conf/files now knows how
to build linux_genassym and generate linux_assym.h on the fly.
Supporting changes elsewhere in the kernel:
The user-mode signal trampoline has moved from the U area to immediately
below the top of the stack (below PS_STRINGS). This allows the different
binary emulations to have their own signal trampoline code (which gets rid
of the hardwired syscall 103 (sigreturn on BSD, syslog on Linux)) and so
that the emulator can provide the exact "struct sigcontext *" argument to
the program's signal handlers.
The sigstack's "ss_flags" now uses SS_DISABLE and SS_ONSTACK flags, which
have the same values as the re-used SA_DISABLE and SA_ONSTACK which are
intended for sigaction only. This enables the support of a SA_RESETHAND
flag to sigaction to implement the gross SYSV and Linux SA_ONESHOT signal
semantics where the signal handler is reset when it's triggered.
makesyscalls.sh no longer appends the struct sysentvec on the end of the
generated init_sysent.c code. It's a lot saner to have it in a seperate
file rather than trying to update the structure inside the awk script. :-)
At exec time, the dozen bytes or so of signal trampoline code are copied
to the top of the user's stack, rather than obtaining the trampoline code
the old way by getting a clone of the parent's user area. This allows
Linux and native binaries to freely exec each other without getting
trampolines mixed up.
1996-03-02 19:38:20 +00:00
|
|
|
};
|
|
|
|
struct linux_ftime_args {
|
|
|
|
int dummy;
|
|
|
|
};
|
|
|
|
struct linux_kill_args {
|
|
|
|
int pid;
|
|
|
|
int signum;
|
|
|
|
};
|
|
|
|
struct linux_rename_args {
|
|
|
|
char * from;
|
|
|
|
char * to;
|
|
|
|
};
|
|
|
|
struct linux_mkdir_args {
|
|
|
|
char * path;
|
|
|
|
int mode;
|
|
|
|
};
|
|
|
|
struct linux_rmdir_args {
|
|
|
|
char * path;
|
|
|
|
};
|
|
|
|
struct linux_pipe_args {
|
|
|
|
int * pipefds;
|
|
|
|
};
|
|
|
|
struct linux_times_args {
|
|
|
|
struct linux_times_argv * buf;
|
|
|
|
};
|
|
|
|
struct linux_prof_args {
|
|
|
|
int dummy;
|
|
|
|
};
|
|
|
|
struct linux_brk_args {
|
|
|
|
char * dsend;
|
|
|
|
};
|
|
|
|
struct linux_signal_args {
|
|
|
|
int sig;
|
|
|
|
linux_handler_t handler;
|
|
|
|
};
|
|
|
|
struct linux_phys_args {
|
|
|
|
int dummy;
|
|
|
|
};
|
|
|
|
struct linux_lock_args {
|
|
|
|
int dummy;
|
|
|
|
};
|
|
|
|
struct linux_ioctl_args {
|
|
|
|
int fd;
|
|
|
|
u_long cmd;
|
|
|
|
int arg;
|
|
|
|
};
|
|
|
|
struct linux_fcntl_args {
|
|
|
|
int fd;
|
|
|
|
int cmd;
|
|
|
|
int arg;
|
|
|
|
};
|
|
|
|
struct linux_mpx_args {
|
|
|
|
int dummy;
|
|
|
|
};
|
|
|
|
struct linux_ulimit_args {
|
|
|
|
int dummy;
|
|
|
|
};
|
|
|
|
struct linux_olduname_args {
|
|
|
|
struct linux_oldold_utsname * up;
|
|
|
|
};
|
|
|
|
struct linux_ustat_args {
|
|
|
|
int dummy;
|
|
|
|
};
|
|
|
|
struct linux_sigaction_args {
|
|
|
|
int sig;
|
|
|
|
struct linux_sigaction * nsa;
|
|
|
|
struct linux_sigaction * osa;
|
|
|
|
};
|
|
|
|
struct linux_siggetmask_args {
|
|
|
|
int dummy;
|
|
|
|
};
|
|
|
|
struct linux_sigsetmask_args {
|
|
|
|
linux_sigset_t mask;
|
|
|
|
};
|
|
|
|
struct linux_sigsuspend_args {
|
1996-03-04 21:03:11 +00:00
|
|
|
int restart;
|
|
|
|
linux_sigset_t oldmask;
|
Mega-commit for Linux emulator update.. This has been stress tested under
netscape-2.0 for Linux running all the Java stuff. The scrollbars are now
working, at least on my machine. (whew! :-)
I'm uncomfortable with the size of this commit, but it's too
inter-dependant to easily seperate out.
The main changes:
COMPAT_LINUX is *GONE*. Most of the code has been moved out of the i386
machine dependent section into the linux emulator itself. The int 0x80
syscall code was almost identical to the lcall 7,0 code and a minor tweak
allows them to both be used with the same C code. All kernels can now
just modload the lkm and it'll DTRT without having to rebuild the kernel
first. Like IBCS2, you can statically compile it in with "options LINUX".
A pile of new syscalls implemented, including getdents(), llseek(),
readv(), writev(), msync(), personality(). The Linux-ELF libraries want
to use some of these.
linux_select() now obeys Linux semantics, ie: returns the time remaining
of the timeout value rather than leaving it the original value.
Quite a few bugs removed, including incorrect arguments being used in
syscalls.. eg: mixups between passing the sigset as an int, vs passing
it as a pointer and doing a copyin(), missing return values, unhandled
cases, SIOC* ioctls, etc.
The build for the code has changed. i386/conf/files now knows how
to build linux_genassym and generate linux_assym.h on the fly.
Supporting changes elsewhere in the kernel:
The user-mode signal trampoline has moved from the U area to immediately
below the top of the stack (below PS_STRINGS). This allows the different
binary emulations to have their own signal trampoline code (which gets rid
of the hardwired syscall 103 (sigreturn on BSD, syslog on Linux)) and so
that the emulator can provide the exact "struct sigcontext *" argument to
the program's signal handlers.
The sigstack's "ss_flags" now uses SS_DISABLE and SS_ONSTACK flags, which
have the same values as the re-used SA_DISABLE and SA_ONSTACK which are
intended for sigaction only. This enables the support of a SA_RESETHAND
flag to sigaction to implement the gross SYSV and Linux SA_ONESHOT signal
semantics where the signal handler is reset when it's triggered.
makesyscalls.sh no longer appends the struct sysentvec on the end of the
generated init_sysent.c code. It's a lot saner to have it in a seperate
file rather than trying to update the structure inside the awk script. :-)
At exec time, the dozen bytes or so of signal trampoline code are copied
to the top of the user's stack, rather than obtaining the trampoline code
the old way by getting a clone of the parent's user area. This allows
Linux and native binaries to freely exec each other without getting
trampolines mixed up.
1996-03-02 19:38:20 +00:00
|
|
|
linux_sigset_t mask;
|
|
|
|
};
|
|
|
|
struct linux_sigpending_args {
|
|
|
|
linux_sigset_t * mask;
|
|
|
|
};
|
|
|
|
struct linux_select_args {
|
|
|
|
struct linux_select_argv * ptr;
|
|
|
|
};
|
|
|
|
struct linux_symlink_args {
|
|
|
|
char * path;
|
|
|
|
char * to;
|
|
|
|
};
|
|
|
|
struct linux_readlink_args {
|
|
|
|
char * name;
|
|
|
|
char * buf;
|
|
|
|
int count;
|
|
|
|
};
|
|
|
|
struct linux_uselib_args {
|
|
|
|
char * library;
|
|
|
|
};
|
|
|
|
struct linux_readdir_args {
|
|
|
|
int fd;
|
|
|
|
struct linux_dirent * dent;
|
|
|
|
unsigned int count;
|
|
|
|
};
|
|
|
|
struct linux_mmap_args {
|
|
|
|
struct linux_mmap_argv * ptr;
|
|
|
|
};
|
|
|
|
struct linux_truncate_args {
|
|
|
|
char * path;
|
|
|
|
long length;
|
|
|
|
};
|
|
|
|
struct linux_statfs_args {
|
|
|
|
char * path;
|
|
|
|
struct linux_statfs_buf * buf;
|
|
|
|
};
|
|
|
|
struct linux_fstatfs_args {
|
|
|
|
int fd;
|
|
|
|
struct linux_statfs_buf * buf;
|
|
|
|
};
|
|
|
|
struct linux_ioperm_args {
|
|
|
|
unsigned int lo;
|
|
|
|
unsigned int hi;
|
|
|
|
int val;
|
|
|
|
};
|
|
|
|
struct linux_socketcall_args {
|
|
|
|
int what;
|
|
|
|
void * args;
|
|
|
|
};
|
|
|
|
struct linux_ksyslog_args {
|
|
|
|
int what;
|
|
|
|
};
|
|
|
|
struct linux_setitimer_args {
|
|
|
|
u_int which;
|
|
|
|
struct itimerval * itv;
|
|
|
|
struct itimerval * oitv;
|
|
|
|
};
|
|
|
|
struct linux_getitimer_args {
|
|
|
|
u_int which;
|
|
|
|
struct itimerval * itv;
|
|
|
|
};
|
|
|
|
struct linux_newstat_args {
|
|
|
|
char * path;
|
|
|
|
struct linux_newstat * buf;
|
|
|
|
};
|
|
|
|
struct linux_newlstat_args {
|
|
|
|
char * path;
|
|
|
|
struct linux_newstat * buf;
|
|
|
|
};
|
|
|
|
struct linux_newfstat_args {
|
|
|
|
int fd;
|
|
|
|
struct linux_newstat * buf;
|
|
|
|
};
|
|
|
|
struct linux_uname_args {
|
|
|
|
struct linux_old_utsname * up;
|
|
|
|
};
|
|
|
|
struct linux_iopl_args {
|
|
|
|
int level;
|
|
|
|
};
|
|
|
|
struct linux_vhangup_args {
|
|
|
|
int dummy;
|
|
|
|
};
|
|
|
|
struct linux_idle_args {
|
|
|
|
int dummy;
|
|
|
|
};
|
|
|
|
struct linux_vm86_args {
|
|
|
|
int dummy;
|
|
|
|
};
|
|
|
|
struct linux_wait4_args {
|
|
|
|
int pid;
|
|
|
|
int * status;
|
|
|
|
int options;
|
|
|
|
struct rusage * rusage;
|
|
|
|
};
|
|
|
|
struct linux_swapoff_args {
|
|
|
|
int dummy;
|
|
|
|
};
|
|
|
|
struct linux_sysinfo_args {
|
|
|
|
int dummy;
|
|
|
|
};
|
|
|
|
struct linux_ipc_args {
|
|
|
|
int what;
|
|
|
|
int arg1;
|
|
|
|
int arg2;
|
|
|
|
int arg3;
|
|
|
|
caddr_t ptr;
|
|
|
|
};
|
|
|
|
struct linux_sigreturn_args {
|
|
|
|
struct linux_sigcontext * scp;
|
|
|
|
};
|
|
|
|
struct linux_clone_args {
|
|
|
|
int dummy;
|
|
|
|
};
|
|
|
|
struct linux_newuname_args {
|
|
|
|
struct linux_newuname_t * buf;
|
|
|
|
};
|
|
|
|
struct linux_modify_ldt_args {
|
|
|
|
int func;
|
|
|
|
void * ptr;
|
|
|
|
size_t bytecount;
|
|
|
|
};
|
|
|
|
struct linux_adjtimex_args {
|
|
|
|
int dummy;
|
|
|
|
};
|
|
|
|
struct linux_sigprocmask_args {
|
|
|
|
int how;
|
|
|
|
linux_sigset_t * mask;
|
|
|
|
linux_sigset_t * omask;
|
|
|
|
};
|
|
|
|
struct linux_create_module_args {
|
|
|
|
int dummy;
|
|
|
|
};
|
|
|
|
struct linux_init_module_args {
|
|
|
|
int dummy;
|
|
|
|
};
|
|
|
|
struct linux_delete_module_args {
|
|
|
|
int dummy;
|
|
|
|
};
|
|
|
|
struct linux_get_kernel_syms_args {
|
|
|
|
int dummy;
|
|
|
|
};
|
|
|
|
struct linux_quotactl_args {
|
|
|
|
int dummy;
|
|
|
|
};
|
|
|
|
struct linux_getpgid_args {
|
|
|
|
int pid;
|
|
|
|
};
|
|
|
|
struct linux_bdflush_args {
|
|
|
|
int dummy;
|
|
|
|
};
|
|
|
|
struct linux_personality_args {
|
|
|
|
int per;
|
|
|
|
};
|
|
|
|
struct linux_llseek_args {
|
|
|
|
int fd;
|
|
|
|
u_int32_t ohigh;
|
|
|
|
u_int32_t olow;
|
|
|
|
caddr_t res;
|
|
|
|
int whence;
|
|
|
|
};
|
|
|
|
struct linux_getdents_args {
|
|
|
|
int fd;
|
|
|
|
void * dent;
|
|
|
|
unsigned count;
|
|
|
|
};
|
|
|
|
struct linux_newselect_args {
|
|
|
|
int nfds;
|
|
|
|
fd_set * readfds;
|
|
|
|
fd_set * writefds;
|
|
|
|
fd_set * exceptfds;
|
|
|
|
struct timeval * timeout;
|
|
|
|
};
|
|
|
|
struct linux_msync_args {
|
|
|
|
caddr_t addr;
|
|
|
|
int len;
|
|
|
|
int fl;
|
|
|
|
};
|
1997-11-06 19:29:57 +00:00
|
|
|
int linux_setup __P((struct proc *, struct linux_setup_args *));
|
|
|
|
int linux_fork __P((struct proc *, struct linux_fork_args *));
|
|
|
|
int linux_open __P((struct proc *, struct linux_open_args *));
|
|
|
|
int linux_waitpid __P((struct proc *, struct linux_waitpid_args *));
|
|
|
|
int linux_creat __P((struct proc *, struct linux_creat_args *));
|
|
|
|
int linux_unlink __P((struct proc *, struct linux_unlink_args *));
|
|
|
|
int linux_execve __P((struct proc *, struct linux_execve_args *));
|
|
|
|
int linux_chdir __P((struct proc *, struct linux_chdir_args *));
|
|
|
|
int linux_time __P((struct proc *, struct linux_time_args *));
|
|
|
|
int linux_mknod __P((struct proc *, struct linux_mknod_args *));
|
|
|
|
int linux_chmod __P((struct proc *, struct linux_chmod_args *));
|
|
|
|
int linux_chown __P((struct proc *, struct linux_chown_args *));
|
|
|
|
int linux_break __P((struct proc *, struct linux_break_args *));
|
|
|
|
int linux_stat __P((struct proc *, struct linux_stat_args *));
|
|
|
|
int linux_lseek __P((struct proc *, struct linux_lseek_args *));
|
|
|
|
int linux_mount __P((struct proc *, struct linux_mount_args *));
|
|
|
|
int linux_umount __P((struct proc *, struct linux_umount_args *));
|
|
|
|
int linux_stime __P((struct proc *, struct linux_stime_args *));
|
|
|
|
int linux_ptrace __P((struct proc *, struct linux_ptrace_args *));
|
|
|
|
int linux_alarm __P((struct proc *, struct linux_alarm_args *));
|
|
|
|
int linux_fstat __P((struct proc *, struct linux_fstat_args *));
|
|
|
|
int linux_pause __P((struct proc *, struct linux_pause_args *));
|
|
|
|
int linux_utime __P((struct proc *, struct linux_utime_args *));
|
|
|
|
int linux_stty __P((struct proc *, struct linux_stty_args *));
|
|
|
|
int linux_gtty __P((struct proc *, struct linux_gtty_args *));
|
|
|
|
int linux_access __P((struct proc *, struct linux_access_args *));
|
|
|
|
int linux_nice __P((struct proc *, struct linux_nice_args *));
|
|
|
|
int linux_ftime __P((struct proc *, struct linux_ftime_args *));
|
|
|
|
int linux_kill __P((struct proc *, struct linux_kill_args *));
|
|
|
|
int linux_rename __P((struct proc *, struct linux_rename_args *));
|
|
|
|
int linux_mkdir __P((struct proc *, struct linux_mkdir_args *));
|
|
|
|
int linux_rmdir __P((struct proc *, struct linux_rmdir_args *));
|
|
|
|
int linux_pipe __P((struct proc *, struct linux_pipe_args *));
|
|
|
|
int linux_times __P((struct proc *, struct linux_times_args *));
|
|
|
|
int linux_prof __P((struct proc *, struct linux_prof_args *));
|
|
|
|
int linux_brk __P((struct proc *, struct linux_brk_args *));
|
|
|
|
int linux_signal __P((struct proc *, struct linux_signal_args *));
|
|
|
|
int linux_phys __P((struct proc *, struct linux_phys_args *));
|
|
|
|
int linux_lock __P((struct proc *, struct linux_lock_args *));
|
|
|
|
int linux_ioctl __P((struct proc *, struct linux_ioctl_args *));
|
|
|
|
int linux_fcntl __P((struct proc *, struct linux_fcntl_args *));
|
|
|
|
int linux_mpx __P((struct proc *, struct linux_mpx_args *));
|
|
|
|
int linux_ulimit __P((struct proc *, struct linux_ulimit_args *));
|
|
|
|
int linux_olduname __P((struct proc *, struct linux_olduname_args *));
|
|
|
|
int linux_ustat __P((struct proc *, struct linux_ustat_args *));
|
|
|
|
int linux_sigaction __P((struct proc *, struct linux_sigaction_args *));
|
|
|
|
int linux_siggetmask __P((struct proc *, struct linux_siggetmask_args *));
|
|
|
|
int linux_sigsetmask __P((struct proc *, struct linux_sigsetmask_args *));
|
|
|
|
int linux_sigsuspend __P((struct proc *, struct linux_sigsuspend_args *));
|
|
|
|
int linux_sigpending __P((struct proc *, struct linux_sigpending_args *));
|
|
|
|
int linux_select __P((struct proc *, struct linux_select_args *));
|
|
|
|
int linux_symlink __P((struct proc *, struct linux_symlink_args *));
|
|
|
|
int linux_readlink __P((struct proc *, struct linux_readlink_args *));
|
|
|
|
int linux_uselib __P((struct proc *, struct linux_uselib_args *));
|
|
|
|
int linux_readdir __P((struct proc *, struct linux_readdir_args *));
|
|
|
|
int linux_mmap __P((struct proc *, struct linux_mmap_args *));
|
|
|
|
int linux_truncate __P((struct proc *, struct linux_truncate_args *));
|
|
|
|
int linux_statfs __P((struct proc *, struct linux_statfs_args *));
|
|
|
|
int linux_fstatfs __P((struct proc *, struct linux_fstatfs_args *));
|
|
|
|
int linux_ioperm __P((struct proc *, struct linux_ioperm_args *));
|
|
|
|
int linux_socketcall __P((struct proc *, struct linux_socketcall_args *));
|
|
|
|
int linux_ksyslog __P((struct proc *, struct linux_ksyslog_args *));
|
|
|
|
int linux_setitimer __P((struct proc *, struct linux_setitimer_args *));
|
|
|
|
int linux_getitimer __P((struct proc *, struct linux_getitimer_args *));
|
|
|
|
int linux_newstat __P((struct proc *, struct linux_newstat_args *));
|
|
|
|
int linux_newlstat __P((struct proc *, struct linux_newlstat_args *));
|
|
|
|
int linux_newfstat __P((struct proc *, struct linux_newfstat_args *));
|
|
|
|
int linux_uname __P((struct proc *, struct linux_uname_args *));
|
|
|
|
int linux_iopl __P((struct proc *, struct linux_iopl_args *));
|
|
|
|
int linux_vhangup __P((struct proc *, struct linux_vhangup_args *));
|
|
|
|
int linux_idle __P((struct proc *, struct linux_idle_args *));
|
|
|
|
int linux_vm86 __P((struct proc *, struct linux_vm86_args *));
|
|
|
|
int linux_wait4 __P((struct proc *, struct linux_wait4_args *));
|
|
|
|
int linux_swapoff __P((struct proc *, struct linux_swapoff_args *));
|
|
|
|
int linux_sysinfo __P((struct proc *, struct linux_sysinfo_args *));
|
|
|
|
int linux_ipc __P((struct proc *, struct linux_ipc_args *));
|
|
|
|
int linux_sigreturn __P((struct proc *, struct linux_sigreturn_args *));
|
|
|
|
int linux_clone __P((struct proc *, struct linux_clone_args *));
|
|
|
|
int linux_newuname __P((struct proc *, struct linux_newuname_args *));
|
|
|
|
int linux_modify_ldt __P((struct proc *, struct linux_modify_ldt_args *));
|
|
|
|
int linux_adjtimex __P((struct proc *, struct linux_adjtimex_args *));
|
|
|
|
int linux_sigprocmask __P((struct proc *, struct linux_sigprocmask_args *));
|
|
|
|
int linux_create_module __P((struct proc *, struct linux_create_module_args *));
|
|
|
|
int linux_init_module __P((struct proc *, struct linux_init_module_args *));
|
|
|
|
int linux_delete_module __P((struct proc *, struct linux_delete_module_args *));
|
|
|
|
int linux_get_kernel_syms __P((struct proc *, struct linux_get_kernel_syms_args *));
|
|
|
|
int linux_quotactl __P((struct proc *, struct linux_quotactl_args *));
|
|
|
|
int linux_getpgid __P((struct proc *, struct linux_getpgid_args *));
|
|
|
|
int linux_bdflush __P((struct proc *, struct linux_bdflush_args *));
|
|
|
|
int linux_personality __P((struct proc *, struct linux_personality_args *));
|
|
|
|
int linux_llseek __P((struct proc *, struct linux_llseek_args *));
|
|
|
|
int linux_getdents __P((struct proc *, struct linux_getdents_args *));
|
|
|
|
int linux_newselect __P((struct proc *, struct linux_newselect_args *));
|
|
|
|
int linux_msync __P((struct proc *, struct linux_msync_args *));
|
Mega-commit for Linux emulator update.. This has been stress tested under
netscape-2.0 for Linux running all the Java stuff. The scrollbars are now
working, at least on my machine. (whew! :-)
I'm uncomfortable with the size of this commit, but it's too
inter-dependant to easily seperate out.
The main changes:
COMPAT_LINUX is *GONE*. Most of the code has been moved out of the i386
machine dependent section into the linux emulator itself. The int 0x80
syscall code was almost identical to the lcall 7,0 code and a minor tweak
allows them to both be used with the same C code. All kernels can now
just modload the lkm and it'll DTRT without having to rebuild the kernel
first. Like IBCS2, you can statically compile it in with "options LINUX".
A pile of new syscalls implemented, including getdents(), llseek(),
readv(), writev(), msync(), personality(). The Linux-ELF libraries want
to use some of these.
linux_select() now obeys Linux semantics, ie: returns the time remaining
of the timeout value rather than leaving it the original value.
Quite a few bugs removed, including incorrect arguments being used in
syscalls.. eg: mixups between passing the sigset as an int, vs passing
it as a pointer and doing a copyin(), missing return values, unhandled
cases, SIOC* ioctls, etc.
The build for the code has changed. i386/conf/files now knows how
to build linux_genassym and generate linux_assym.h on the fly.
Supporting changes elsewhere in the kernel:
The user-mode signal trampoline has moved from the U area to immediately
below the top of the stack (below PS_STRINGS). This allows the different
binary emulations to have their own signal trampoline code (which gets rid
of the hardwired syscall 103 (sigreturn on BSD, syslog on Linux)) and so
that the emulator can provide the exact "struct sigcontext *" argument to
the program's signal handlers.
The sigstack's "ss_flags" now uses SS_DISABLE and SS_ONSTACK flags, which
have the same values as the re-used SA_DISABLE and SA_ONSTACK which are
intended for sigaction only. This enables the support of a SA_RESETHAND
flag to sigaction to implement the gross SYSV and Linux SA_ONESHOT signal
semantics where the signal handler is reset when it's triggered.
makesyscalls.sh no longer appends the struct sysentvec on the end of the
generated init_sysent.c code. It's a lot saner to have it in a seperate
file rather than trying to update the structure inside the awk script. :-)
At exec time, the dozen bytes or so of signal trampoline code are copied
to the top of the user's stack, rather than obtaining the trampoline code
the old way by getting a clone of the parent's user area. This allows
Linux and native binaries to freely exec each other without getting
trampolines mixed up.
1996-03-02 19:38:20 +00:00
|
|
|
|
|
|
|
#ifdef COMPAT_43
|
|
|
|
|
|
|
|
|
|
|
|
#endif /* COMPAT_43 */
|
|
|
|
|
|
|
|
#endif /* !_LINUX_SYSPROTO_H_ */
|