From 7eade05dfa5c79c8765c89ae76635f31451fe886 Mon Sep 17 00:00:00 2001 From: tanimura Date: Sun, 9 Nov 2003 09:17:26 +0000 Subject: - Implement selwakeuppri() which allows raising the priority of a thread being waken up. The thread waken up can run at a priority as high as after tsleep(). - Replace selwakeup()s with selwakeuppri()s and pass appropriate priorities. - Add cv_broadcastpri() which raises the priority of the broadcast threads. Used by selwakeuppri() if collision occurs. Not objected in: -arch, -current --- sys/dev/sound/midi/midibuf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/dev/sound/midi') diff --git a/sys/dev/sound/midi/midibuf.c b/sys/dev/sound/midi/midibuf.c index 8b4eda7..f444405 100644 --- a/sys/dev/sound/midi/midibuf.c +++ b/sys/dev/sound/midi/midibuf.c @@ -358,7 +358,7 @@ queuerawdata(midi_dbuf *dbuf, char *data, int len) /* Wake up the processes sleeping on input data. */ cv_broadcast(&dbuf->cv_in); if (SEL_WAITING(&dbuf->sel) && dbuf->rl >= dbuf->blocksize) - selwakeup(&dbuf->sel); + selwakeuppri(&dbuf->sel, PRIBIO); } static void @@ -399,5 +399,5 @@ deleterawdata(midi_dbuf *dbuf, int len) /* Wake up the processes sleeping on queueing. */ cv_broadcast(&dbuf->cv_out); if (SEL_WAITING(&dbuf->sel) && dbuf->fl >= dbuf->blocksize) - selwakeup(&dbuf->sel); + selwakeuppri(&dbuf->sel, PRIBIO); } -- cgit v1.1