21 #include "../../SDL_internal.h"
30 #if SDL_THREADS_DISABLED
47 return SDL_SetError(
"SDL not built with thread support");
53 return SDL_SetError(
"SDL not built with thread support");
59 return SDL_SetError(
"SDL not built with thread support");
71 return SDL_SetError(
"SDL not built with thread support");
94 sem->count = initial_value;
95 sem->waiters_count = 0;
99 if (!sem->count_lock || !sem->count_nonzero) {
114 sem->count = 0xFFFFFFFF;
115 while (sem->waiters_count > 0) {
120 if (sem->count_lock) {
140 if (sem->count > 0) {
164 ++sem->waiters_count;
168 sem->count_lock, timeout);
170 --sem->waiters_count;
207 if (sem->waiters_count > 0) {