全部博文(1958)
分类: LINUX
2011-03-16 17:43:01
SDL_CondWait -- Wait on a condition variable
Synopsis#include "SDL.h" #include "SDL_thread.h" int SDL_CondWait(SDL_cond *cond, SDL_mutex *mut);Description
Unlock the provided mutex and wait for another thread to call or on the condition variable cond, then re-lock the mutex and return. The mutex must be locked before entering this function. Returns 0 when it is signalled, or -1 on an error.
解锁传递来的mutex,等待其他的线程调用 or 设置条件变量 cond。然后解锁mutex,并返回。
mutex是在进入SDL_ConWait之前就被锁定的。
SDL_ConWait被signalled,那么返回0,代表成功。否则返回-1或者其他 ,代表出错。
See Also