Thread creation error handling (max 12 treads can be created) and priority equal to the main (64)
This commit is contained in:
parent
30ed1f23d6
commit
b341a986bb
|
@ -48,7 +48,12 @@ void *run_thread(void *data)
|
||||||
|
|
||||||
int SDL_SYS_CreateThread(SDL_Thread *thread, void *args)
|
int SDL_SYS_CreateThread(SDL_Thread *thread, void *args)
|
||||||
{
|
{
|
||||||
LWP_CreateThread(&thread->handle, run_thread, args, 0, 0, 80);
|
|
||||||
|
if ( LWP_CreateThread(&thread->handle, run_thread, args, 0, 0, 64) != 0 ) {
|
||||||
|
SDL_SetError("Not enough resources to create thread");
|
||||||
|
return(-1);
|
||||||
|
}
|
||||||
|
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in a new issue