Thread creation error handling (max 12 treads can be created) and priority equal to the main (64)

This commit is contained in:
fabio.olimpieri 2014-12-21 17:49:18 +00:00
parent 30ed1f23d6
commit b341a986bb

View file

@ -48,7 +48,12 @@ void *run_thread(void *data)
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);
}