MythTV and PVR500 (was: Possible FreeBSD port?)

John-Mark Gurney gurney_j at resnet.uoregon.edu
Thu Dec 21 18:18:16 PST 2006


usleepless at gmail.com wrote this message on Wed, Dec 20, 2006 at 22:40 +0100:
> because i am still running on a 4.11 server, the mythbackend needed to
> run on 4.11. i soon discovered that mythtv had strange ipc, so i
> compiled it against linux-threads ( had to rebuild QT with
> linux-threads as well ). i remember it helped a little, but not
> enough.
> 
> i stumbled upon all the busy-wait-loops:
> 
> "
>  while(!condition)
>        usleep(50);
> "
> 
> this is probably the reason why i needed linux-threads. but there is a
> catch: linux-usleep guarantees a context-switch, while freebsd doesn't
> ( didn't ? ).
> 
> my first solution was to redefine usleep in mythcontext.h, to force a
> context-switch. this produced a working mythtv-install. later on, i
> removed all busy-wait-loops because they are just plain stupid.

Why not use sched_yield(2)?  I forget if it's in 4.x, but I'm pretty
sure just yield is in 4.x...  That will force a context switch...

-- 
  John-Mark Gurney				Voice: +1 415 225 5579

     "All that I will do, has been done, All that I have, has not."


More information about the freebsd-multimedia mailing list