threads/118910: Multithreading problem

David Xu davidxu at
Fri Dec 21 00:10:25 PST 2007

Ariff Abdullah wrote:
> On Fri, 21 Dec 2007 15:41:41 +0800
> David Xu <davidxu at> wrote:
>> Daniel Eischen wrote:
>>> On Fri, 21 Dec 2007, David Xu wrote:
>>>> The kernel condition variable implementation is problematic, a
>>>> thread sleeping on a condition variable does not raise its
>>> priority > to some I/O priority, but most code will raise thread's
>>> priority to some > level with msleep(). The code in sound driver
>>> use lots of cv_broadcast > call(), it does not raise thread
>>> priority, this causes the music player > does not have more chances
>>> to do I/O while other I/O bound applications > will have.
> The critical that require raising the priority are using
> cv_broadcastpri(), not cv_broadcast(). See sys/dev/sound/pcm/channel.h
> .

I know there is cv_broadcastpri, but I still think code in kernel should
run first. :-)

> With all due respect, the original poster issue are more to fluxbox
> non-opaque window dragging implementation which require locking the
> entire X server through XGrab/UngrabServer(), which in turns
> preventing other client windows to update their own gui, blocking the
> entire client operation. It has little or nothing to do with
> threading.
> Kuteynikov, go to fluxbox menu, and enable
> "Opaque Window Moving/Dragging/Resizing" (or whatever it is).


> --
> Ariff Abdullah
> FreeBSD
> ... Recording in stereo is obviously too advanced
>     and confusing for us idiot ***** users :P ........

More information about the freebsd-threads mailing list