Source-Changes-HG archive

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

[src/trunk]: src/sys/vm Fix a braino in vm_map_unlock(). Thanks to Chuck Sil...



details:   https://anonhg.NetBSD.org/src/rev/93d61aafec18
branches:  trunk
changeset: 473570:93d61aafec18
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Mon Jun 07 16:34:04 1999 +0000

description:
Fix a braino in vm_map_unlock().  Thanks to Chuck Silvers for pointing
out that there was a problem, and for sending me a trace.

diffstat:

 sys/vm/vm_map.h |  11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 4d68b5d74a96 -r 93d61aafec18 sys/vm/vm_map.h
--- a/sys/vm/vm_map.h   Mon Jun 07 16:31:42 1999 +0000
+++ b/sys/vm/vm_map.h   Mon Jun 07 16:34:04 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vm_map.h,v 1.28 1999/06/07 15:25:19 thorpej Exp $      */
+/*     $NetBSD: vm_map.h,v 1.29 1999/06/07 16:34:04 thorpej Exp $      */
 
 /* 
  * Copyright (c) 1991, 1993
@@ -264,10 +264,15 @@
 #endif
 
 #define        vm_map_unlock(map)                                              \
-       (void) lockmgr(&(map)->lock, LK_RELEASE, (void *)0)
+do {                                                                   \
+       if ((map)->flags & VM_MAP_INTRSAFE)                             \
+               simple_unlock(&(map)->lock.lk_interlock);               \
+       else                                                            \
+               (void) lockmgr(&(map)->lock, LK_RELEASE, NULL);         \
+} while (0)
 
 #define        vm_map_unlock_read(map)                                         \
-       (void) lockmgr(&(map)->lock, LK_RELEASE, (void *)0)
+       (void) lockmgr(&(map)->lock, LK_RELEASE, NULL)
 #endif /* _KERNEL */
 
 /*



Home | Main Index | Thread Index | Old Index