Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src changes to bio hypercalls, part 3/n:



details:   https://anonhg.NetBSD.org/src/rev/dd46c6f48878
branches:  trunk
changeset: 786468:dd46c6f48878
user:      pooka <pooka%NetBSD.org@localhost>
date:      Mon Apr 29 13:19:11 2013 +0000

description:
changes to bio hypercalls, part 3/n:

retire the filemmap/memsync hypercalls, they're no longer used

diffstat:

 lib/librumpuser/rumpuser.c       |  51 +--------------------------------------
 sys/rump/include/rump/rumpuser.h |   8 +-----
 2 files changed, 3 insertions(+), 56 deletions(-)

diffs (95 lines):

diff -r eb30cd4cc1ce -r dd46c6f48878 lib/librumpuser/rumpuser.c
--- a/lib/librumpuser/rumpuser.c        Mon Apr 29 13:17:32 2013 +0000
+++ b/lib/librumpuser/rumpuser.c        Mon Apr 29 13:19:11 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rumpuser.c,v 1.38 2013/04/29 12:56:04 pooka Exp $      */
+/*     $NetBSD: rumpuser.c,v 1.39 2013/04/29 13:19:11 pooka Exp $      */
 
 /*
  * Copyright (c) 2007-2010 Antti Kantee.  All Rights Reserved.
@@ -28,7 +28,7 @@
 #include "rumpuser_port.h"
 
 #if !defined(lint)
-__RCSID("$NetBSD: rumpuser.c,v 1.38 2013/04/29 12:56:04 pooka Exp $");
+__RCSID("$NetBSD: rumpuser.c,v 1.39 2013/04/29 13:19:11 pooka Exp $");
 #endif /* !lint */
 
 #include <sys/ioctl.h>
@@ -282,53 +282,6 @@
        assert(rv == 0);
 }
 
-void *
-rumpuser_filemmap(int fd, off_t offset, size_t len, int flags, int *error)
-{
-       void *rv;
-       int mmflags, prot;
-
-       if (flags & RUMPUSER_FILEMMAP_TRUNCATE) {
-               if (ftruncate(fd, offset + len) == -1) {
-                       seterror(errno);
-                       return NULL;
-               }
-       }
-
-/* it's implicit */
-#if defined(__sun__) && !defined(MAP_FILE)
-#define MAP_FILE 0
-#endif
-
-       mmflags = MAP_FILE;
-       if (flags & RUMPUSER_FILEMMAP_SHARED)
-               mmflags |= MAP_SHARED;
-       else
-               mmflags |= MAP_PRIVATE;
-
-       prot = 0;
-       if (flags & RUMPUSER_FILEMMAP_READ)
-               prot |= PROT_READ;
-       if (flags & RUMPUSER_FILEMMAP_WRITE)
-               prot |= PROT_WRITE;
-
-       rv = mmap(NULL, len, PROT_READ|PROT_WRITE, mmflags, fd, offset);
-       if (rv == MAP_FAILED) {
-               seterror(errno);
-               return NULL;
-       }
-
-       seterror(0);
-       return rv;
-}
-
-int
-rumpuser_memsync(void *addr, size_t len, int *error)
-{
-
-       DOCALL_KLOCK(int, (msync(addr, len, MS_SYNC)));
-}
-
 int
 rumpuser_open(const char *path, int ruflags, int *error)
 {
diff -r eb30cd4cc1ce -r dd46c6f48878 sys/rump/include/rump/rumpuser.h
--- a/sys/rump/include/rump/rumpuser.h  Mon Apr 29 13:17:32 2013 +0000
+++ b/sys/rump/include/rump/rumpuser.h  Mon Apr 29 13:19:11 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rumpuser.h,v 1.89 2013/04/29 12:56:03 pooka Exp $      */
+/*     $NetBSD: rumpuser.h,v 1.90 2013/04/29 13:19:11 pooka Exp $      */
 
 /*
  * Copyright (c) 2007-2013 Antti Kantee.  All Rights Reserved.
@@ -57,13 +57,7 @@
 void rumpuser_free(void *, size_t);
 
 void *rumpuser_anonmmap(void *, size_t, int, int, int *);
-#define RUMPUSER_FILEMMAP_READ         0x01
-#define RUMPUSER_FILEMMAP_WRITE                0x02
-#define RUMPUSER_FILEMMAP_TRUNCATE     0x04
-#define RUMPUSER_FILEMMAP_SHARED       0x08
-void *rumpuser_filemmap(int fd, off_t, size_t, int, int *);
 void  rumpuser_unmap(void *, size_t);
-int   rumpuser_memsync(void *, size_t, int *);
 
 #define RUMPUSER_OPEN_RDONLY   0x0000
 #define RUMPUSER_OPEN_WRONLY   0x0001



Home | Main Index | Thread Index | Old Index