Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2002-04-24 01:33:41 +0400
committerJeff Johnston <jjohnstn@redhat.com>2002-04-24 01:33:41 +0400
commitb9f9f699372fae9f3b7926fa165d07fe68a949fb (patch)
treec6212ab5fc51c520cfa62e5d66b1e08776fcd151 /newlib/libc/sys/linux/mmap.c
parent54492ef5c66430812b1e4188d19f33799273be93 (diff)
2002-04-23 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/machine/types.h (__pid_t, __off_t, __loff_t): Added. * libc/sys/linux/Makefile.am: Add support for mmap.c. * libc/sys/linux/Makefile.in: Regenerated. * libc/sys/linux/mmap.c: New file. * libc/sys/linux/machine/i386/syscall.h: Add _syscall6 macro. * libc/sys/linux/sys/types.h (pid_t, off_t, loff_t): Added.
Diffstat (limited to 'newlib/libc/sys/linux/mmap.c')
-rw-r--r--newlib/libc/sys/linux/mmap.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/newlib/libc/sys/linux/mmap.c b/newlib/libc/sys/linux/mmap.c
new file mode 100644
index 000000000..d7dbeb842
--- /dev/null
+++ b/newlib/libc/sys/linux/mmap.c
@@ -0,0 +1,16 @@
+/* libc/sys/linux/mmap.c - Memory mapping functions */
+
+/* Copyright 2002, Red Hat Inc. */
+
+#include <sys/mman.h>
+#include <machine/syscall.h>
+
+_syscall6(void *,mmap,void *,addr,size_t,len,int,prot,int,flags,int,fd,off_t,off);
+_syscall2(int,munmap,void *,addr,size_t,len);
+_syscall1(int,mlockall,int,flags);
+_syscall0(int,munlockall);
+_syscall2(int,mlock,const void *,addr,size_t,len);
+_syscall2(int,munlock,const void *,addr,size_t,len);
+_syscall3(int,mprotect,void *,addr,size_t,len,int,prot);
+_syscall3(int,msync,void *,addr,size_t,len,int,flags);
+_syscall4(void *,mremap,void *,addr,size_t,oldlen,size_t,newlen,int,maymove);