[SDL] Some clarification on how SDL_cond works...

Bruno Martínez br1 at internet.com.uy
Thu Jun 1 16:21:43 PDT 2006


On Thu, 01 Jun 2006 04:30:06 -0300, Id Kong <spam_receptacle_ at hotmail.com>  
wrote:

> It looks like SDL_cond is what one would call Events in Win32.

Wrong.

>  However,
> what I don't understand is the role of SDL_mutex.  What is that mutex  
> for?
> Why must it be locked when I call SDL_CondWait()?

You use the mutex to be sure to be the only thread accessing the data and  
the conditional variable to sleep until the data has some property.   
Google for conditional variable.

Regards,
Bruno





More information about the SDL mailing list