[mythtv] usleep(), busy wait and FreeBSD

Lorenzo Vicisano lorenzo at vicisano.net
Tue Sep 2 14:59:33 EDT 2003


On Tue, Sep 02, 2003 at 03:18:45PM -0400, Isaac Richards wrote:
> 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.

I could gradually work on the conversion and provide incremental
patches, however I'm testing on FreeBSD, hence it will have to be
re-tested on Linux.

.. I would love to do so: currently it's a pain for me to merge
the mainline changes into my port.

	thanks,
	Lorenzo

> 
> Isaac
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


More information about the mythtv-dev mailing list