summaryrefslogtreecommitdiffstats
path: root/sys/sys
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>1999-03-27 21:16:58 +0000
committeralc <alc@FreeBSD.org>1999-03-27 21:16:58 +0000
commitc9eccc7347cc4051a3db16f68f3a854908494917 (patch)
tree5921615b06b186f28e5d3133d7bc1b1a43ab944d /sys/sys
parent807da996a2d52fdc0c28d408fabc635bb3c681d4 (diff)
downloadFreeBSD-src-c9eccc7347cc4051a3db16f68f3a854908494917.zip
FreeBSD-src-c9eccc7347cc4051a3db16f68f3a854908494917.tar.gz
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 <jplevyak@inktomi.com>
Diffstat (limited to 'sys/sys')
-rw-r--r--sys/sys/syscall-hide.h2
-rw-r--r--sys/sys/syscall.h2
-rw-r--r--sys/sys/syscall.mk2
-rw-r--r--sys/sys/sysproto.h14
4 files changed, 20 insertions, 0 deletions
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 *));
OpenPOWER on IntegriCloud