#pragma section-numbers off #pragma camelcase off = SDL_LockMutex = Use this function to lock a mutex created with [[SDL_CreateMutex]](). <> == Syntax == {{{#!highlight cpp int SDL_LockMutex(SDL_mutex* mutex) }}} == Function Parameters == ||'''mutex''' ||the mutex to lock|| == Return Value == Returns 0 on success or a negative error code on failure; call [[SDL_GetError]]() for more information. == Code Examples == <> == Remarks == Calls to this function will not return while the mutex is locked by another thread. See [[SDL_TryLockMutex]]() to attempt to lock the mutex without blocking. SDL mutexes are recursive. == Related Functions == .[[SDL_CreateMutex]] .[[SDL_DestroyMutex]] .[[SDL_TryLockMutex]] .[[SDL_UnlockMutex]] ---- [[CategoryAPI]], [[CategoryMutex]]