Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/cmp Use MAP_SHARED.



details:   https://anonhg.NetBSD.org/src/rev/8d271c55997d
branches:  trunk
changeset: 495376:8d271c55997d
user:      mycroft <mycroft%NetBSD.org@localhost>
date:      Thu Jul 27 02:58:57 2000 +0000

description:
Use MAP_SHARED.

diffstat:

 usr.bin/cmp/regular.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (33 lines):

diff -r 6d2be891601e -r 8d271c55997d usr.bin/cmp/regular.c
--- a/usr.bin/cmp/regular.c     Thu Jul 27 01:36:56 2000 +0000
+++ b/usr.bin/cmp/regular.c     Thu Jul 27 02:58:57 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: regular.c,v 1.9 2000/07/18 10:23:43 jdolecek Exp $     */
+/*     $NetBSD: regular.c,v 1.10 2000/07/27 02:58:57 mycroft Exp $     */
 
 /*-
  * Copyright (c) 1991, 1993, 1994
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)regular.c  8.3 (Berkeley) 4/2/94";
 #else
-__RCSID("$NetBSD: regular.c,v 1.9 2000/07/18 10:23:43 jdolecek Exp $");
+__RCSID("$NetBSD: regular.c,v 1.10 2000/07/27 02:58:57 mycroft Exp $");
 #endif
 #endif /* not lint */
 
@@ -82,12 +82,12 @@
        }
 
        if ((p1 = (u_char *)mmap(NULL, (size_t)length,
-           PROT_READ, MAP_FILE, fd1, skip1)) == MAP_FAILED)
+           PROT_READ, MAP_FILE|MAP_SHARED, fd1, skip1)) == MAP_FAILED)
                goto mmap_failed;
        (void)madvise(p1, (size_t)length, MADV_SEQUENTIAL);
 
        if ((p2 = (u_char *)mmap(NULL, (size_t)length,
-           PROT_READ, MAP_FILE, fd2, skip2)) == MAP_FAILED) {
+           PROT_READ, MAP_FILE|MAP_SHARED, fd2, skip2)) == MAP_FAILED) {
                munmap(p1, (size_t) length);
                goto mmap_failed;
        }



Home | Main Index | Thread Index | Old Index