23 #ifdef SDL_THREAD_BEOS
29 #include <be/kernel/OS.h>
31 #include "SDL_mutex.h"
32 #include "SDL_thread.h"
33 #include "../SDL_thread_c.h"
34 #include "../SDL_systhread.h"
38 SIGHUP, SIGINT, SIGQUIT, SIGPIPE, SIGALRM, SIGTERM, SIGWINCH, 0
51 sigprocmask(SIG_BLOCK, &mask, omask);
57 sigprocmask(SIG_SETMASK, omask,
NULL);
71 const char *threadname = thread->
name ? thread->
name :
"SDL Thread";
72 char name[B_OS_NAME_LENGTH];
74 name[
sizeof (
name) - 1] =
'\0';
77 thread->
handle = spawn_thread(
RunThread, name, B_NORMAL_PRIORITY, args);
78 if ((thread->
handle == B_NO_MORE_THREADS) ||
79 (thread->
handle == B_NO_MEMORY)) {
80 return SDL_SetError(
"Not enough resources to create thread");
82 resume_thread(thread->
handle);
106 value = B_LOW_PRIORITY;
108 value = B_URGENT_DISPLAY_PRIORITY;
110 value = B_NORMAL_PRIORITY;
112 set_thread_priority(find_thread(
NULL), value);
121 wait_for_thread(thread->
handle, &the_status);
DECLSPEC SDL_threadID SDLCALL SDL_ThreadID(void)
unsigned long SDL_threadID
DECLSPEC int SDLCALL SDL_snprintf(char *text, size_t maxlen, const char *fmt,...)
static void * RunThread(void *data)
EGLImageKHR EGLint * name
int SDL_SYS_CreateThread(SDL_Thread *thread, void *args)
void SDL_UnmaskSignals(sigset_t *omask)
void SDL_SYS_WaitThread(SDL_Thread *thread)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
int SDL_SYS_SetThreadPriority(SDL_ThreadPriority priority)
DECLSPEC int SDLCALL SDL_SetError(const char *fmt,...)
static const int sig_list[]
static SDL_Thread * thread
EGLSurface EGLint void ** value
GLint GLint GLint GLint GLint GLint GLint GLbitfield mask
void SDL_RunThread(void *data)
void SDL_SYS_SetupThread(const char *name)
void SDL_MaskSignals(sigset_t *omask)