32 SDL_Log(
"Thread number %d has got the semaphore (value = %d)!\n",
36 SDL_Log(
"Thread number %d has released the semaphore (value = %d)!\n",
40 SDL_Log(
"Thread number %d exiting.\n", threadnum);
59 SDL_Log(
"Waiting 2 seconds on semaphore\n");
65 duration = end_ticks - start_ticks;
68 if (duration > 1900 && duration < 2050)
71 SDL_Log(
"Wait took %d milliseconds\n", duration);
89 SDL_Log(
"Usage: %s init_value\n", argv[0]);
101 init_sem = atoi(argv[1]);
117 SDL_Log(
"Waiting for threads to finish\n");
122 SDL_Log(
"Finished waiting for threads\n");
#define SDL_SemWaitTimeout
#define SDL_DestroySemaphore
#define SDL_LogSetPriority
#define SDL_CreateSemaphore
@ SDL_LOG_CATEGORY_APPLICATION
#define SDL_MUTEX_TIMEDOUT
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLuint const GLchar * name
Uint32 SDL_GetTicks(void)
Get the number of milliseconds since the SDL library initialization.
return Display return Display Bool Bool int int int return Display XEvent Bool(*) XPointer return Display return Display Drawable _Xconst char unsigned int unsigned int return Display Pixmap Pixmap XColor XColor unsigned int unsigned int return Display _Xconst char char int char return Display Visual unsigned int int int char unsigned int unsigned int in i)
static SDL_Thread * threads[6]
int main(int argc, char **argv)
static void killed(int sig)
int ThreadFunc(void *data)
static void TestWaitTimeout(void)