Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/cardbus Use config_pending. Addresses kern/9247.
details: https://anonhg.NetBSD.org/src/rev/950bf89d47cc
branches: trunk
changeset: 481201:950bf89d47cc
user: thorpej <thorpej%NetBSD.org@localhost>
date: Mon Jan 24 18:34:44 2000 +0000
description:
Use config_pending. Addresses kern/9247.
diffstat:
sys/dev/cardbus/cardslot.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diffs (37 lines):
diff -r 5a466536fd50 -r 950bf89d47cc sys/dev/cardbus/cardslot.c
--- a/sys/dev/cardbus/cardslot.c Mon Jan 24 18:07:54 2000 +0000
+++ b/sys/dev/cardbus/cardslot.c Mon Jan 24 18:34:44 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cardslot.c,v 1.5 1999/11/15 06:08:02 haya Exp $ */
+/* $NetBSD: cardslot.c,v 1.6 2000/01/24 18:34:44 thorpej Exp $ */
/*
* Copyright (c) 1999
@@ -163,6 +163,7 @@
if (csc != NULL || psc != NULL) {
#if __NetBSD_Version__ > 104060000
+ config_pending_incr();
kthread_create(create_slot_manager, (void *)sc);
#else
kthread_create_deferred(create_slot_manager, (void *)sc);
@@ -329,7 +330,7 @@
{
struct cardslot_softc *sc = arg;
struct cardslot_event *ce;
- int s;
+ int s, first = 1;
static int antonym_ev[4] = {
CARDSLOT_EVENT_REMOVAL_16, CARDSLOT_EVENT_INSERTION_16,
CARDSLOT_EVENT_REMOVAL_CB, CARDSLOT_EVENT_INSERTION_CB
@@ -339,6 +340,10 @@
s = spltty();
if ((ce = SIMPLEQ_FIRST(&sc->sc_events)) == NULL) {
splx(s);
+ if (first) {
+ first = 0;
+ config_pending_decr();
+ }
(void) tsleep(&sc->sc_events, PWAIT, "cardslotev", 0);
continue;
}
Home |
Main Index |
Thread Index |
Old Index