#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include "SDL.h"
Go to the source code of this file.
◆ killed()
static void killed |
( |
int |
sig | ) |
|
|
static |
◆ main()
int main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
Definition at line 56 of file testthread.c.
References alive, killed(), NULL, quit(), SDL_assert, SDL_CreateThread, SDL_Delay, SDL_GetError, SDL_Init, SDL_Log, SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO, SDL_LogError, SDL_LogSetPriority, SDL_Quit, SDL_TLSCreate, SDL_TLSGet, SDL_TLSSet, SDL_WaitThread, ThreadFunc(), and tls.
81 SDL_Log(
"Waiting for thread #1\n");
int ThreadFunc(void *data)
static void killed(int sig)
#define SDL_assert(condition)
#define SDL_LogSetPriority
◆ quit()
static void quit |
( |
int |
rc | ) |
|
|
static |
◆ ThreadFunc()
int ThreadFunc |
( |
void * |
data | ) |
|
Definition at line 33 of file testthread.c.
References alive, NULL, SDL_Delay, SDL_Log, SDL_ThreadID, SDL_TLSGet, SDL_TLSSet, and tls.
Referenced by main().
36 SDL_Log(
"Started thread %s: My thread id is %lu, thread data = %s\n",
39 SDL_Log(
"Thread '%s' is alive!\n", (
char *) data);
42 SDL_Log(
"Thread '%s' exiting!\n", (
char *) data);
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
◆ alive
◆ tls