summaryrefslogtreecommitdiffstats
path: root/sys/alpha/linux
diff options
context:
space:
mode:
authorbms <bms@FreeBSD.org>2004-03-29 02:19:43 +0000
committerbms <bms@FreeBSD.org>2004-03-29 02:19:43 +0000
commit3ac6131b81445b601628d35c1488a50039849847 (patch)
tree432e95ff10e04221f751a372fbe81ae30015d1e5 /sys/alpha/linux
parent163b236504b7729f12514af9c50a4bc81cacc473 (diff)
downloadFreeBSD-src-3ac6131b81445b601628d35c1488a50039849847.zip
FreeBSD-src-3ac6131b81445b601628d35c1488a50039849847.tar.gz
MFi386: Use the BSD madvise() syscall implementation for Linux binary
emulation, instead of treating it as an unimplemented syscall. Requested by: marcel
Diffstat (limited to 'sys/alpha/linux')
-rw-r--r--sys/alpha/linux/linux_dummy.c1
-rw-r--r--sys/alpha/linux/linux_proto.h4
-rw-r--r--sys/alpha/linux/linux_syscall.h2
-rw-r--r--sys/alpha/linux/linux_sysent.c2
-rw-r--r--sys/alpha/linux/syscalls.master2
5 files changed, 3 insertions, 8 deletions
diff --git a/sys/alpha/linux/linux_dummy.c b/sys/alpha/linux/linux_dummy.c
index 2f9c863..d27b52a 100644
--- a/sys/alpha/linux/linux_dummy.c
+++ b/sys/alpha/linux/linux_dummy.c
@@ -66,7 +66,6 @@ DUMMY(sendfile);
DUMMY(getdtablesize);
DUMMY(gethostname);
DUMMY(getpagesize);
-DUMMY(madvise);
DUMMY(mincore);
DUMMY(old_adjtimex);
DUMMY(pciconfig_iobase);
diff --git a/sys/alpha/linux/linux_proto.h b/sys/alpha/linux/linux_proto.h
index cd60f9d..baff6f4 100644
--- a/sys/alpha/linux/linux_proto.h
+++ b/sys/alpha/linux/linux_proto.h
@@ -150,9 +150,6 @@ struct linux_mprotect_args {
char len_l_[PADL_(l_size_t)]; l_size_t len; char len_r_[PADR_(l_size_t)];
char prot_l_[PADL_(l_ulong)]; l_ulong prot; char prot_r_[PADR_(l_ulong)];
};
-struct linux_madvise_args {
- register_t dummy;
-};
struct linux_vhangup_args {
register_t dummy;
};
@@ -612,7 +609,6 @@ int linux_newlstat(struct thread *, struct linux_newlstat_args *);
int linux_mmap(struct thread *, struct linux_mmap_args *);
int linux_munmap(struct thread *, struct linux_munmap_args *);
int linux_mprotect(struct thread *, struct linux_mprotect_args *);
-int linux_madvise(struct thread *, struct linux_madvise_args *);
int linux_vhangup(struct thread *, struct linux_vhangup_args *);
int linux_setgroups(struct thread *, struct linux_setgroups_args *);
int linux_getgroups(struct thread *, struct linux_getgroups_args *);
diff --git a/sys/alpha/linux/linux_syscall.h b/sys/alpha/linux/linux_syscall.h
index 9ddf6a2..1b0bcdb 100644
--- a/sys/alpha/linux/linux_syscall.h
+++ b/sys/alpha/linux/linux_syscall.h
@@ -51,7 +51,7 @@
#define LINUX_SYS_linux_mmap 71
#define LINUX_SYS_linux_munmap 73
#define LINUX_SYS_linux_mprotect 74
-#define LINUX_SYS_linux_madvise 75
+#define LINUX_SYS_madvise 75
#define LINUX_SYS_linux_vhangup 76
#define LINUX_SYS_linux_setgroups 79
#define LINUX_SYS_linux_getgroups 80
diff --git a/sys/alpha/linux/linux_sysent.c b/sys/alpha/linux/linux_sysent.c
index cef8c64..730e4e8 100644
--- a/sys/alpha/linux/linux_sysent.c
+++ b/sys/alpha/linux/linux_sysent.c
@@ -92,7 +92,7 @@ struct sysent linux_sysent[] = {
{ 0, (sy_call_t *)nosys }, /* 72 = */
{ AS(linux_munmap_args), (sy_call_t *)linux_munmap }, /* 73 = linux_munmap */
{ AS(linux_mprotect_args), (sy_call_t *)linux_mprotect }, /* 74 = linux_mprotect */
- { 0, (sy_call_t *)linux_madvise }, /* 75 = linux_madvise */
+ { SYF_MPSAFE | AS(madvise_args), (sy_call_t *)madvise }, /* 75 = madvise */
{ 0, (sy_call_t *)linux_vhangup }, /* 76 = linux_vhangup */
{ 0, (sy_call_t *)nosys }, /* 77 = */
{ 0, (sy_call_t *)nosys }, /* 78 = */
diff --git a/sys/alpha/linux/syscalls.master b/sys/alpha/linux/syscalls.master
index 594363f..cf77942 100644
--- a/sys/alpha/linux/syscalls.master
+++ b/sys/alpha/linux/syscalls.master
@@ -114,7 +114,7 @@
73 STD { int linux_munmap(l_ulong addr, l_size_t len); }
74 STD { int linux_mprotect(l_ulong addr, l_size_t len, \
l_ulong prot); }
-75 STD { int linux_madvise(void); }
+75 MNOPROTO { int madvise(void *addr, size_t len, int behav); }
76 STD { int linux_vhangup(void); }
77 UNIMPL
78 UNIMPL
OpenPOWER on IntegriCloud