[mythtv] usleep(), busy wait and FreeBSD

Isaac Richards ijr at po.cwru.edu
Tue Sep 2 16:18:45 EDT 2003


On Tuesday 02 September 2003 03:10 pm, Lorenzo Vicisano wrote:
> Not sure why this doesn't happen in Linux, a possibility is that the
> process of the calling thread is actually put to sleep ... which would
> bump the effective wait to the system tick value (1 millisecond ?).
> If you know I'd be curious to learn..

usleep() always sleeps for a minimum of a timeslice in Linux, at least with 
2.4.

> Anyhow, these are my questions:
>
> a) Is there a reason why synchronization in mythtv is implemented with
>    busy waits and not with condition variables ?

Easier the way it is, really.  I wouldn't be adverse to a patch to convert 
things to condition variables, though.

Isaac


More information about the mythtv-dev mailing list