[x264-devel] Re: bug in commit 607

Loren Merritt lorenm at u.washington.edu
Sun Dec 17 12:02:25 CET 2006


On Sun, 17 Dec 2006, Guillaume POIRIER wrote:
> On 12/17/06, Loren Merritt <lorenm at u.washington.edu> wrote:
>>
>> On linux, we don't need any thread synchronization primitives.
>>    while(!*foo) usleep(100);
>> is faster (though not by much. it wouldn't kill performance if we had to
>> enable condition variables on linux too).
>
> I was wondering: do pthread use SSE3 thread synchro instructions
> primitives whenever they are available, or do programmers have to code
> their own primitives if they want to use SSE3?

My copy of libpthread.so doesn't contain any monitor/mwait instructions.
But I don't think they're the right tool for x264's sliceless threading 
anyway: monitor/mwait are optimizations for a spinloop, they don't yield 
control to another thread. x264 benefits from running more threads than 
cpus, and yielding whenever the current thread can't continue.

--Loren Merritt

-- 
This is the x264-devel mailing-list
To unsubscribe, go to: http://developers.videolan.org/lists.html



More information about the x264-devel mailing list