summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2008-11-05 06:32:48 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2008-11-05 06:32:48 +0000
commit119c9ee39a6e0e8aa76720d500c666eb4f4dad77 (patch)
tree811ec26bd2b1c5c21f37909160082022f6831546 /sys/arch
parentedf003c75120e2d05055e5046060d2a25619bb08 (diff)
since mmclose() is only called once for the final close,
set ap_open_count = 0 in mmclose() instread of decrementing it. ok miod@, oga@.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/alpha/alpha/mem.c4
-rw-r--r--sys/arch/amd64/amd64/mem.c4
-rw-r--r--sys/arch/arm/arm/mem.c4
-rw-r--r--sys/arch/i386/i386/mem.c4
-rw-r--r--sys/arch/macppc/macppc/mem.c4
-rw-r--r--sys/arch/socppc/socppc/mem.c4
6 files changed, 12 insertions, 12 deletions
diff --git a/sys/arch/alpha/alpha/mem.c b/sys/arch/alpha/alpha/mem.c
index a1a6425ae42..fc09c66d6f1 100644
--- a/sys/arch/alpha/alpha/mem.c
+++ b/sys/arch/alpha/alpha/mem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mem.c,v 1.22 2007/09/22 16:21:32 krw Exp $ */
+/* $OpenBSD: mem.c,v 1.23 2008/11/05 06:32:47 matthieu Exp $ */
/* $NetBSD: mem.c,v 1.26 2000/03/29 03:48:20 simonb Exp $ */
/*
@@ -109,7 +109,7 @@ mmclose(dev, flag, mode, p)
#ifdef APERTURE
if (minor(dev) == 4) {
- ap_open_count--;
+ ap_open_count = 0;
ap_open_pid = -1;
}
#endif
diff --git a/sys/arch/amd64/amd64/mem.c b/sys/arch/amd64/amd64/mem.c
index 8d88d80ac7d..787b3a6ef9f 100644
--- a/sys/arch/amd64/amd64/mem.c
+++ b/sys/arch/amd64/amd64/mem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mem.c,v 1.13 2008/06/11 10:54:08 phessler Exp $ */
+/* $OpenBSD: mem.c,v 1.14 2008/11/05 06:32:47 matthieu Exp $ */
/*
* Copyright (c) 1988 University of Utah.
* Copyright (c) 1982, 1986, 1990, 1993
@@ -122,7 +122,7 @@ mmclose(dev_t dev, int flag, int mode, struct proc *p)
{
#ifdef APERTURE
if (minor(dev) == 4)
- ap_open_count--;
+ ap_open_count = 0;
#endif
return (0);
}
diff --git a/sys/arch/arm/arm/mem.c b/sys/arch/arm/arm/mem.c
index 7c5ee6a6b0b..b93800399fc 100644
--- a/sys/arch/arm/arm/mem.c
+++ b/sys/arch/arm/arm/mem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mem.c,v 1.8 2008/05/04 09:57:46 martin Exp $ */
+/* $OpenBSD: mem.c,v 1.9 2008/11/05 06:32:47 matthieu Exp $ */
/* $NetBSD: mem.c,v 1.11 2003/10/16 12:02:58 jdolecek Exp $ */
/*
@@ -137,7 +137,7 @@ mmclose(dev, flag, mode, p)
{
#ifdef APERTURE
if (minor(dev) == 4)
- ap_open_count--;
+ ap_open_count = 0;
#endif
return (0);
}
diff --git a/sys/arch/i386/i386/mem.c b/sys/arch/i386/i386/mem.c
index 86fb86aa2f4..6c94688c0c0 100644
--- a/sys/arch/i386/i386/mem.c
+++ b/sys/arch/i386/i386/mem.c
@@ -1,5 +1,5 @@
/* $NetBSD: mem.c,v 1.31 1996/05/03 19:42:19 christos Exp $ */
-/* $OpenBSD: mem.c,v 1.34 2007/09/07 15:00:19 art Exp $ */
+/* $OpenBSD: mem.c,v 1.35 2008/11/05 06:32:47 matthieu Exp $ */
/*
* Copyright (c) 1988 University of Utah.
* Copyright (c) 1982, 1986, 1990, 1993
@@ -108,7 +108,7 @@ mmclose(dev_t dev, int flag, int mode, struct proc *p)
{
#ifdef APERTURE
if (minor(dev) == 4)
- ap_open_count--;
+ ap_open_count = 0;
#endif
return (0);
}
diff --git a/sys/arch/macppc/macppc/mem.c b/sys/arch/macppc/macppc/mem.c
index 53c6b0f99fb..8c6a07e5c1c 100644
--- a/sys/arch/macppc/macppc/mem.c
+++ b/sys/arch/macppc/macppc/mem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mem.c,v 1.15 2007/10/14 17:29:04 kettenis Exp $ */
+/* $OpenBSD: mem.c,v 1.16 2008/11/05 06:32:47 matthieu Exp $ */
/* $NetBSD: mem.c,v 1.1 1996/09/30 16:34:50 ws Exp $ */
/*
@@ -222,7 +222,7 @@ mmclose(dev_t dev, int flag, int mode, struct proc *p)
{
#ifdef APERTURE
if (minor(dev) == 4)
- ap_open_count--;
+ ap_open_count = 0;
#endif
return 0;
}
diff --git a/sys/arch/socppc/socppc/mem.c b/sys/arch/socppc/socppc/mem.c
index add5fc64368..a99549460d4 100644
--- a/sys/arch/socppc/socppc/mem.c
+++ b/sys/arch/socppc/socppc/mem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mem.c,v 1.1 2008/05/10 12:02:21 kettenis Exp $ */
+/* $OpenBSD: mem.c,v 1.2 2008/11/05 06:32:47 matthieu Exp $ */
/* $NetBSD: mem.c,v 1.1 1996/09/30 16:34:50 ws Exp $ */
/*
@@ -89,7 +89,7 @@ mmclose(dev_t dev, int flag, int mode, struct proc *p)
{
#ifdef xAPERTURE
if (minor(dev) == 4)
- ap_open_count--;
+ ap_open_count = 0;
#endif
return 0;
}