Platform/프로세스
SDL
jjryu
2008. 12. 13. 16:29
SDL_Delay()
// 새로운 쓰레드 생성
// 새로운 쓰레드 생성
#include "SDL_thread.h"
...
int thread_func(void *unused)
{
...
int thread_func(void *unused)
{
...
return(0);
}
...
SDL_Thread *thread = SDL_CreateThread(thread_func, NULL);
if ( thread == NULL ) {
...
SDL_Thread *thread = SDL_CreateThread(thread_func, NULL);
if ( thread == NULL ) {
fprintf(stderr, "Unable to create thread: %s\n", SDL_GetError());
return;
}
...
SDL_WaitThread(thread, NULL);
...
SDL_WaitThread(thread, NULL);