void mtx_leave(struct mutex *mtx) { MUTEX_ASSERT_LOCKED(mtx); mtx->mtx_lock = 0; if (mtx->mtx_wantipl != IPL_NONE << 4) _cpu_intr_resume(mtx->mtx_oldipl); }
void mtx_leave(struct mutex *mtx) { MUTEX_ASSERT_LOCKED(mtx); mtx->mtx_lock = 0; if (mtx->mtx_wantipl != IPL_NONE) splx(mtx->mtx_oldipl); }
void mtx_leave(struct mutex *mtx) { MUTEX_ASSERT_LOCKED(mtx); #ifdef DIAGNOSTIC curcpu()->ci_mutex_level--; #endif mtx->mtx_lock = 0; splx(mtx->mtx_oldipl); }
static void send_vblank_event(struct drm_device *dev, struct drm_pending_vblank_event *e, unsigned long seq, struct timeval *now) { struct drm_file *file_priv = e->base.file_priv; MUTEX_ASSERT_LOCKED(&dev->event_lock); e->event.sequence = seq; e->event.tv_sec = now->tv_sec; e->event.tv_usec = now->tv_usec; TAILQ_INSERT_TAIL(&file_priv->evlist, &e->base, link); wakeup(&file_priv->evlist); selwakeup(&file_priv->rsel); #if 0 trace_drm_vblank_event_delivered(e->base.pid, e->pipe, e->event.sequence); #endif }
void mtx_leave(struct mutex *mtx) { int s; MUTEX_ASSERT_LOCKED(mtx); #ifdef MULTIPROCESSOR membar_exit(); #endif #ifdef DIAGNOSTIC curcpu()->ci_mutex_level--; #endif s = mtx->mtx_oldipl; mtx->mtx_owner = NULL; if (mtx->mtx_wantipl != IPL_NONE) splx(s); }
void midi_ointr(void *addr) { struct midi_softc *sc = (struct midi_softc *)addr; struct midi_buffer *mb; MUTEX_ASSERT_LOCKED(&audio_lock); if (!(sc->dev.dv_flags & DVF_ACTIVE) || !(sc->flags & FWRITE)) return; mb = &sc->outbuf; if (mb->used > 0) { #ifdef MIDI_DEBUG if (!sc->isbusy) { printf("midi_ointr: output must be busy\n"); } #endif midi_out_do(sc); } else if (sc->isbusy) midi_out_stop(sc); }
void midi_iintr(void *addr, int data) { struct midi_softc *sc = (struct midi_softc *)addr; struct midi_buffer *mb = &sc->inbuf; MUTEX_ASSERT_LOCKED(&audio_lock); if (!(sc->dev.dv_flags & DVF_ACTIVE) || !(sc->flags & FREAD)) return; if (MIDIBUF_ISFULL(mb)) return; /* discard data */ MIDIBUF_WRITE(mb, data); if (mb->used == 1) { if (sc->rchan) { sc->rchan = 0; wakeup(&sc->rchan); } selwakeup(&sc->rsel); if (sc->async) psignal(sc->async, SIGIO); } }