From c9eccc7347cc4051a3db16f68f3a854908494917 Mon Sep 17 00:00:00 2001 From: alc Date: Sat, 27 Mar 1999 21:16:58 +0000 Subject: Added pread and pwrite. These functions are defined by the X/Open Threads Extension. (Note: We use the same syscall numbers as NetBSD.) Submitted by: John Plevyak --- sys/sys/syscall-hide.h | 2 ++ sys/sys/syscall.h | 2 ++ sys/sys/syscall.mk | 2 ++ sys/sys/sysproto.h | 14 ++++++++++++++ 4 files changed, 20 insertions(+) (limited to 'sys/sys') diff --git a/sys/sys/syscall-hide.h b/sys/sys/syscall-hide.h index 814bfec..11b5b2c 100644 --- a/sys/sys/syscall-hide.h +++ b/sys/sys/syscall-hide.h @@ -158,6 +158,8 @@ HIDE_BSD(rtprio) HIDE_BSD(semsys) HIDE_BSD(msgsys) HIDE_BSD(shmsys) +HIDE_POSIX(pread) +HIDE_POSIX(pwrite) HIDE_BSD(ntp_adjtime) HIDE_POSIX(setgid) HIDE_BSD(setegid) diff --git a/sys/sys/syscall.h b/sys/sys/syscall.h index 464ea91..b4fcab9 100644 --- a/sys/sys/syscall.h +++ b/sys/sys/syscall.h @@ -166,6 +166,8 @@ #define SYS_semsys 169 #define SYS_msgsys 170 #define SYS_shmsys 171 +#define SYS_pread 173 +#define SYS_pwrite 174 #define SYS_ntp_adjtime 176 #define SYS_setgid 181 #define SYS_setegid 182 diff --git a/sys/sys/syscall.mk b/sys/sys/syscall.mk index 581290a..9e7e23c 100644 --- a/sys/sys/syscall.mk +++ b/sys/sys/syscall.mk @@ -123,6 +123,8 @@ MIASM = \ semsys.o \ msgsys.o \ shmsys.o \ + pread.o \ + pwrite.o \ ntp_adjtime.o \ setgid.o \ setegid.o \ diff --git a/sys/sys/sysproto.h b/sys/sys/sysproto.h index 71f9492..7a7d1bc 100644 --- a/sys/sys/sysproto.h +++ b/sys/sys/sysproto.h @@ -542,6 +542,18 @@ struct shmsys_args { int a3; char a3_[PAD_(int)]; int a4; char a4_[PAD_(int)]; }; +struct pread_args { + int fd; char fd_[PAD_(int)]; + void * buf; char buf_[PAD_(void *)]; + size_t nbyte; char nbyte_[PAD_(size_t)]; + off_t offset; char offset_[PAD_(off_t)]; +}; +struct pwrite_args { + int fd; char fd_[PAD_(int)]; + const void * buf; char buf_[PAD_(const void *)]; + size_t nbyte; char nbyte_[PAD_(size_t)]; + off_t offset; char offset_[PAD_(off_t)]; +}; struct ntp_adjtime_args { struct timex * tp; char tp_[PAD_(struct timex *)]; }; @@ -1014,6 +1026,8 @@ int rtprio __P((struct proc *, struct rtprio_args *)); int semsys __P((struct proc *, struct semsys_args *)); int msgsys __P((struct proc *, struct msgsys_args *)); int shmsys __P((struct proc *, struct shmsys_args *)); +int pread __P((struct proc *, struct pread_args *)); +int pwrite __P((struct proc *, struct pwrite_args *)); int ntp_adjtime __P((struct proc *, struct ntp_adjtime_args *)); int setgid __P((struct proc *, struct setgid_args *)); int setegid __P((struct proc *, struct setegid_args *)); -- cgit v1.1