Go to the documentation of this file.
21 #include "../../SDL_internal.h"
33 #include <pspthreadman.h>
34 #include <pspkerror.h>
49 sem->semid = sceKernelCreateSema(
"SDL sema", 0, initial_value, 255,
NULL);
67 sceKernelDeleteSema(
sem->semid);
90 res = sceKernelPollSema(
sem->semid, 1);
104 res = sceKernelWaitSema(
sem->semid, 1, pTimeout);
106 case SCE_KERNEL_ERROR_OK:
108 case SCE_KERNEL_ERROR_WAIT_TIMEOUT:
128 SceKernelSemaInfo info;
135 if (sceKernelReferSemaStatus(
sem->semid, &info) >= 0) {
136 return info.currentCount;
150 res = sceKernelSignalSema(
sem->semid, 1);
int SDL_SemTryWait(SDL_sem *sem)
GLbitfield GLuint64 timeout
SDL_sem * SDL_CreateSemaphore(Uint32 initial_value)
int SDL_SemWait(SDL_sem *sem)
#define SDL_MUTEX_TIMEDOUT
#define SDL_MUTEX_MAXWAIT
int SDL_SemPost(SDL_sem *sem)
Uint32 SDL_SemValue(SDL_sem *sem)
#define SDL_OutOfMemory()
int SDL_SemWaitTimeout(SDL_sem *sem, Uint32 timeout)
void SDL_DestroySemaphore(SDL_sem *sem)