Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Unlock mutex before jumping off from the critical r...
details: https://anonhg.NetBSD.org/src/rev/bb55b08df530
branches: trunk
changeset: 499490:bb55b08df530
user: enami <enami%NetBSD.org@localhost>
date: Tue Nov 21 03:53:27 2000 +0000
description:
Unlock mutex before jumping off from the critical region instead of
testing if locked.
diffstat:
sys/kern/tty_pty.c | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
diffs (29 lines):
diff -r a0f2636bb7d1 -r bb55b08df530 sys/kern/tty_pty.c
--- a/sys/kern/tty_pty.c Tue Nov 21 03:47:41 2000 +0000
+++ b/sys/kern/tty_pty.c Tue Nov 21 03:53:27 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tty_pty.c,v 1.53 2000/11/20 06:36:02 veego Exp $ */
+/* $NetBSD: tty_pty.c,v 1.54 2000/11/21 03:53:27 enami Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1993
@@ -135,10 +135,6 @@
if (minor(dev) >= maxptys) {
limit_reached:
tablefull("pty", "increase kern.maxptys");
-#if defined(LOCKDEBUG)
- if (simple_lock_held(&pt_softc_mutex))
-#endif
- simple_unlock(&pt_softc_mutex);
return (ENXIO);
}
@@ -162,7 +158,7 @@
simple_lock(&pt_softc_mutex);
if (maxptys == npty) {
- /* we hold the mutex here */
+ simple_unlock(&pt_softc_mutex);
goto limit_reached;
}
} while(newnpty > maxptys);
Home |
Main Index |
Thread Index |
Old Index