version 1.41.8.3, 2008/03/23 02:04:35 |
version 1.42, 2007/10/08 16:18:02 |
|
|
/* sequencer.c,v 1.41.8.2 2008/01/09 01:52:15 matt Exp */ |
/* $NetBSD$ */ |
|
|
/* |
/* |
* Copyright (c) 1998 The NetBSD Foundation, Inc. |
* Copyright (c) 1998 The NetBSD Foundation, Inc. |
|
|
*/ |
*/ |
|
|
#include <sys/cdefs.h> |
#include <sys/cdefs.h> |
__KERNEL_RCSID(0, "sequencer.c,v 1.41.8.2 2008/01/09 01:52:15 matt Exp"); |
__KERNEL_RCSID(0, "$NetBSD$"); |
|
|
#include "sequencer.h" |
#include "sequencer.h" |
|
|
Line 269 seq_timeout(void *addr) |
|
Line 269 seq_timeout(void *addr) |
|
seq_startoutput(sc); |
seq_startoutput(sc); |
if (SEQ_QLEN(&sc->outq) < sc->lowat) { |
if (SEQ_QLEN(&sc->outq) < sc->lowat) { |
seq_wakeup(&sc->wchan); |
seq_wakeup(&sc->wchan); |
selnotify(&sc->wsel, 0, 0); |
selnotify(&sc->wsel, 0); |
if (sc->async != NULL) { |
if (sc->async != NULL) { |
mutex_enter(&proclist_mutex); |
mutex_enter(&proclist_mutex); |
if ((p = sc->async) != NULL) |
if ((p = sc->async) != NULL) |
Line 326 seq_softintr(void *cookie) |
|
Line 326 seq_softintr(void *cookie) |
|
struct proc *p; |
struct proc *p; |
|
|
seq_wakeup(&sc->rchan); |
seq_wakeup(&sc->rchan); |
selnotify(&sc->rsel, 0, 0); |
selnotify(&sc->rsel, 0); |
if (sc->async != NULL) { |
if (sc->async != NULL) { |
mutex_enter(&proclist_mutex); |
mutex_enter(&proclist_mutex); |
if ((p = sc->async) != NULL) |
if ((p = sc->async) != NULL) |
Line 728 sequencerkqfilter(dev_t dev, struct knot |
|
Line 728 sequencerkqfilter(dev_t dev, struct knot |
|
break; |
break; |
|
|
default: |
default: |
return (EINVAL); |
return (1); |
} |
} |
|
|
kn->kn_hook = sc; |
kn->kn_hook = sc; |
Line 1189 midiseq_open(int unit, int flags) |
|
Line 1189 midiseq_open(int unit, int flags) |
|
error = cdev_open(dev, flags, 0, 0); |
error = cdev_open(dev, flags, 0, 0); |
if (error) |
if (error) |
return (0); |
return (0); |
sc = device_private(midi_cd.cd_devs[unit]); |
sc = midi_cd.cd_devs[unit]; |
sc->seqopen = 1; |
sc->seqopen = 1; |
md = malloc(sizeof *md, M_DEVBUF, M_WAITOK|M_ZERO); |
md = malloc(sizeof *md, M_DEVBUF, M_WAITOK|M_ZERO); |
sc->seq_md = md; |
sc->seq_md = md; |