[FFmpeg-devel] [RFC] Removing non-pthreads support

Ramiro Polla ramiro.polla
Sat Apr 24 17:29:37 CEST 2010


2010/4/21 M?ns Rullg?rd <mans at mansr.com>:
> Ramiro Polla <ramiro.polla at gmail.com> writes:
>> Another thing, starting with Windows Vista, windows now has condition
>> variables, maybe w32 threading could be re-implemented using those
>> (I'm just suggesting, I don't know if there would be any benefit).
>
> I suggested this removal because I want less code to maintain. ?If
> pthreads is adequate, there is no reason to bulk up our code with
> support for other threading models.

There seems to be a 1:1 mapping using condition variables (but I haven't tested)
pthread_cond_signal -> WakeConditionVariable
pthread_cond_broadcast -> WakeAllConditionVariable
pthread_mutex_lock -> WaitForSingleObject
pthread_mutex_unlock -> ReleaseMutex
pthread_cond_wait -> SleepConditionVariableCS
pthread_join -> WaitForSingleObject

this way, the pthreads code could be used with defines in os_support.h



More information about the ffmpeg-devel mailing list