[vlc-devel] [PATCH 19/41] Implement thread support for OS/2
komh78 at gmail.com
Sat Oct 15 10:22:04 CEST 2011
Rémi Denis-Courmont wrote:
> On Fri, 14 Oct 2011 23:28:46 +0900, KO Myung-Hun <komh78 at gmail.com> wrote:
>>>> +typedef struct
>>>> + HEV hev;
>>>> + HMTX wait_mutex;
>>>> + HMTX count_mutex;
>>>> + int count;
>>>> + int max_count;
>>>> +} vlc_sem_t;
>>> A semaphore can be reimplemented with one mutex, one condition variable
>>> one integer. So it's surprising that 'HMTX' are required here.
>> HMTX is a mutex. What problem ?
> I just meant to say that a semaphore should need only one mutex (and one
> condition variable), not two mutexes (and one condition variable).
One is for a hev variable to wake up a thread one by one, and the other
is for a count varaible to prevent a race condition between post() and
HEV does not match to a condition variable exactly.
Using Mozilla SeaMonkey 2.0.14
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 vlc-devel