src/thread/pthread/SDL_systhread.c
changeset 1459 1e8582152d44
parent 1402 d910939febfa
child 1662 782fd950bd46
child 1895 c121d94672cb
child 4159 a1b03ba2fcd0
     1.1 --- a/src/thread/pthread/SDL_systhread.c	Thu Mar 02 03:18:21 2006 +0000
     1.2 +++ b/src/thread/pthread/SDL_systhread.c	Thu Mar 02 03:24:20 2006 +0000
     1.3 @@ -34,6 +34,13 @@
     1.4  	SIGVTALRM, SIGPROF, 0
     1.5  };
     1.6  
     1.7 +#ifdef __RISCOS__
     1.8 +/* RISC OS needs to know the main thread for
     1.9 + * it's timer and event processing. */
    1.10 +int riscos_using_threads = 0;
    1.11 +Uint32 riscos_main_thread = 0; /* Thread running events */
    1.12 +#endif
    1.13 + 
    1.14  
    1.15  static void *RunThread(void *data)
    1.16  {
    1.17 @@ -58,6 +65,14 @@
    1.18  		SDL_SetError("Not enough resources to create thread");
    1.19  		return(-1);
    1.20  	}
    1.21 +
    1.22 +#ifdef __RISCOS__
    1.23 +	if (riscos_using_threads == 0) {
    1.24 +		riscos_using_threads = 1;
    1.25 +		riscos_main_thread = SDL_ThreadID();
    1.26 +	}
    1.27 +#endif
    1.28 +
    1.29  	return(0);
    1.30  }
    1.31