[FFmpeg-devel] [PATCH] Reimplementation of OS/2 threads model

KO Myung-Hun komh
Tue Apr 27 17:28:07 CEST 2010

M?ns Rullg?rd wrote:
> KO Myung-Hun <komh at chollian.net> writes:
>> M?ns Rullg?rd wrote:
>>> KO Myung-Hun <komh at chollian.net> writes:
>>>> +static Semaphore *CreateSemaphore(void *v1, LONG lCount, LONG lMax, void *v2){
>>> Is this emulating something?  What's wrong with semaphore calls in the
>>> old code?
>> The (event) semaphore of the old code wakes up all the waiting threads.
>> And it resets the status to non-signaled regardless of its post count.
>> So I decided to emulate the semaphore model of Win32. It can wake up
>> waiting threads one by one and decrease its post count.
> Would it be possible to use the native semaphores, or is this
> emulation strictly required?  If we end up emulating win32threads, we
> might as well use the pthreads emulation instead and save ourselves
> some trouble.

Frankly, I cannot find any differences between the native semaphores and
the emulated models. But I agree with you that it would be better to use
the pthreads emulation in order to follow up the changes of pthread.c in
the future.

I'll try this later.

KO Myung-Hun

Using Mozilla SeaMonkey 2.0.3
Under OS/2 Warp 4 for Korean with FixPak #15
On AMD ThunderBird 1GHz with 512 MB RAM

Korean OS/2 User Community : http://www.ecomstation.co.kr

More information about the ffmpeg-devel mailing list