diff options
| author | ad <ad@NetBSD.org> | 2007-02-09 21:55:00 +0000 |
|---|---|---|
| committer | ad <ad@NetBSD.org> | 2007-02-09 21:55:00 +0000 |
| commit | b07ec3fc388a5aeae51e8871aa89eefea3ce1e53 (patch) | |
| tree | c93d3b23a29f98ac0e26c9d43afb509219d0ea42 /sys/dev/wscons | |
| parent | 5c1aad3ad0b9d2403784bd52128e8e8399e22254 (diff) | |
Merge newlock2 to head.
Diffstat (limited to 'sys/dev/wscons')
| -rw-r--r-- | sys/dev/wscons/wsdisplay_compat_usl.c | 14 | ||||
| -rw-r--r-- | sys/dev/wscons/wsevent.c | 9 | ||||
| -rw-r--r-- | sys/dev/wscons/wskbd.c | 8 | ||||
| -rw-r--r-- | sys/dev/wscons/wsmux.c | 8 |
4 files changed, 25 insertions, 14 deletions
diff --git a/sys/dev/wscons/wsdisplay_compat_usl.c b/sys/dev/wscons/wsdisplay_compat_usl.c index 76da1fb631a..39b8457ad04 100644 --- a/sys/dev/wscons/wsdisplay_compat_usl.c +++ b/sys/dev/wscons/wsdisplay_compat_usl.c @@ -1,4 +1,4 @@ -/* $NetBSD: wsdisplay_compat_usl.c,v 1.38 2006/12/26 16:42:07 elad Exp $ */ +/* $NetBSD: wsdisplay_compat_usl.c,v 1.39 2007/02/09 21:55:30 ad Exp $ */ /* * Copyright (c) 1998 @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: wsdisplay_compat_usl.c,v 1.38 2006/12/26 16:42:07 elad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wsdisplay_compat_usl.c,v 1.39 2007/02/09 21:55:30 ad Exp $"); #include "opt_compat_freebsd.h" #include "opt_compat_netbsd.h" @@ -138,7 +138,11 @@ usl_sync_done(struct usl_syncdata *sd) static int usl_sync_check(struct usl_syncdata *sd) { - if (sd->s_proc == pfind(sd->s_pid)) + int rv; + mutex_enter(&proclist_mutex); /* XXXSMP */ + rv = (sd->s_proc == p_find(sd->s_pid, PFIND_LOCKED)); + mutex_exit(&proclist_mutex); /* XXXSMP */ + if (rv) return (1); printf("usl_sync_check: process %d died\n", sd->s_pid); usl_sync_done(sd); @@ -176,7 +180,9 @@ usl_detachproc(void *cookie, int waitok, sd->s_callback = callback; sd->s_cbarg = cbarg; sd->s_flags |= SF_DETACHPENDING; + mutex_enter(&proclist_mutex); psignal(sd->s_proc, sd->s_relsig); + mutex_exit(&proclist_mutex); callout_reset(&sd->s_detach_ch, wscompat_usl_synctimeout * hz, usl_detachtimeout, sd); @@ -236,7 +242,9 @@ usl_attachproc(void *cookie, int waitok, sd->s_callback = callback; sd->s_cbarg = cbarg; sd->s_flags |= SF_ATTACHPENDING; + mutex_enter(&proclist_mutex); psignal(sd->s_proc, sd->s_acqsig); + mutex_exit(&proclist_mutex); callout_reset(&sd->s_attach_ch, wscompat_usl_synctimeout * hz, usl_attachtimeout, sd); diff --git a/sys/dev/wscons/wsevent.c b/sys/dev/wscons/wsevent.c index bd83b647d1f..aacc3a78d53 100644 --- a/sys/dev/wscons/wsevent.c +++ b/sys/dev/wscons/wsevent.c @@ -1,4 +1,4 @@ -/* $NetBSD: wsevent.c,v 1.22 2006/11/16 01:33:31 christos Exp $ */ +/* $NetBSD: wsevent.c,v 1.23 2007/02/09 21:55:30 ad Exp $ */ /*- * Copyright (c) 2006 The NetBSD Foundation, Inc. @@ -111,7 +111,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: wsevent.c,v 1.22 2006/11/16 01:33:31 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wsevent.c,v 1.23 2007/02/09 21:55:30 ad Exp $"); #include <sys/param.h> #include <sys/kernel.h> @@ -325,8 +325,11 @@ wsevent_wakeup(struct wseventvar *ev) wakeup(ev); } - if (ev->async) + if (ev->async) { + mutex_enter(&proclist_mutex); psignal(ev->io, SIGIO); + mutex_exit(&proclist_mutex); + } } /* diff --git a/sys/dev/wscons/wskbd.c b/sys/dev/wscons/wskbd.c index cb8a0ded2e4..4207babfb1d 100644 --- a/sys/dev/wscons/wskbd.c +++ b/sys/dev/wscons/wskbd.c @@ -1,4 +1,4 @@ -/* $NetBSD: wskbd.c,v 1.99 2007/01/04 18:44:46 elad Exp $ */ +/* $NetBSD: wskbd.c,v 1.100 2007/02/09 21:55:30 ad Exp $ */ /* * Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved. @@ -79,7 +79,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: wskbd.c,v 1.99 2007/01/04 18:44:46 elad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wskbd.c,v 1.100 2007/02/09 21:55:30 ad Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -1270,10 +1270,10 @@ wskbd_set_display(struct device *dv, struct wsevsrc *me) } if (displaydv) - printf("%s: connecting to %s\n", + aprint_verbose("%s: connecting to %s\n", sc->sc_base.me_dv.dv_xname, displaydv->dv_xname); else - printf("%s: disconnecting from %s\n", + aprint_verbose("%s: disconnecting from %s\n", sc->sc_base.me_dv.dv_xname, odisplaydv->dv_xname); return (0); diff --git a/sys/dev/wscons/wsmux.c b/sys/dev/wscons/wsmux.c index 79a3b8ad391..a242be2172f 100644 --- a/sys/dev/wscons/wsmux.c +++ b/sys/dev/wscons/wsmux.c @@ -1,4 +1,4 @@ -/* $NetBSD: wsmux.c,v 1.46 2006/11/16 01:33:31 christos Exp $ */ +/* $NetBSD: wsmux.c,v 1.47 2007/02/09 21:55:30 ad Exp $ */ /* * Copyright (c) 1998, 2005 The NetBSD Foundation, Inc. @@ -44,7 +44,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: wsmux.c,v 1.46 2006/11/16 01:33:31 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wsmux.c,v 1.47 2007/02/09 21:55:30 ad Exp $"); #include "wsdisplay.h" #include "wsmux.h" @@ -840,7 +840,7 @@ wsmux_set_display(struct wsmux_softc *sc, struct device *displaydv) sc->sc_base.me_dispdv = displaydv; if (displaydv) - printf("%s: connecting to %s\n", + aprint_verbose("%s: connecting to %s\n", sc->sc_base.me_dv.dv_xname, displaydv->dv_xname); ok = 0; error = 0; @@ -870,7 +870,7 @@ wsmux_set_display(struct wsmux_softc *sc, struct device *displaydv) error = 0; if (displaydv == NULL) - printf("%s: disconnecting from %s\n", + aprint_verbose("%s: disconnecting from %s\n", sc->sc_base.me_dv.dv_xname, odisplaydv->dv_xname); return (error); |
