(define-sdl-func (* sdl-mutex-t) sdl-create-mutex () "SDL_CreateMutex")
(define-sdl-func int sdl-lock-mutex ((mutex (* sdl-mutex-t))) "SDL_LockMutex")
(define-sdl-func int sdl-try-lock-mutex ((mutex (* sdl-mutex-t))) "SDL_TryLockMutex")
(define-sdl-func int sdl-unlock-mutex ((mutex (* sdl-mutex-t))) "SDL_UnlockMutex")
(define-sdl-func void sdl-destroy-mutex ((mutex (* sdl-mutex-t))) "SDL_DestroyMutex")
(define-sdl-func (* sdl-sem-t) sdl-create-semaphore ((initial_value uint32)) "SDL_CreateSemaphore")
(define-sdl-func void sdl-destroy-semaphore ((sem (* sdl-sem-t))) "SDL_DestroySemaphore")
(define-sdl-func int sdl-sem-wait ((sem (* sdl-sem-t))) "SDL_SemWait")
(define-sdl-func int sdl-sem-try-wait ((sem (* sdl-sem-t))) "SDL_SemTryWait")
(define-sdl-func int sdl-sem-wait-timeout ((sem (* sdl-sem-t)) (ms uint32)) "SDL_SemWaitTimeout")
(define-sdl-func int sdl-sem-post ((sem (* sdl-sem-t))) "SDL_SemPost")
(define-sdl-func uint32 sdl-sem-value ((sem (* sdl-sem-t))) "SDL_SemValue")
(define-sdl-func (* sdl-cond-t) sdl-create-cond () "SDL_CreateCond")
(define-sdl-func void sdl-destroy-cond ((cond (* sdl-cond-t))) "SDL_DestroyCond")
(define-sdl-func int sdl-cond-signal ((cond (* sdl-cond-t))) "SDL_CondSignal")
(define-sdl-func int sdl-cond-broadcast ((cond (* sdl-cond-t))) "SDL_CondBroadcast")
(define-sdl-func int sdl-cond-wait ((cond (* sdl-cond-t)) (mutex (* sdl-mutex-t))) "SDL_CondWait")
(define-sdl-func int sdl-cond-wait-timeout ((cond (* sdl-cond-t)) (mutex (* sdl-mutex-t)) (ms uint32)) "SDL_CondWaitTimeout")
