src/thread/pthread/SDL_systhread.c
changeset 3578 0d1b16ee0bca
parent 3162 dc1eb82ffdaa
child 3697 f7b03b6838cb
equal deleted inserted replaced
3577:72024425b437 3578:0d1b16ee0bca
    36 
    36 
    37 #ifdef __RISCOS__
    37 #ifdef __RISCOS__
    38 /* RISC OS needs to know the main thread for
    38 /* RISC OS needs to know the main thread for
    39  * it's timer and event processing. */
    39  * it's timer and event processing. */
    40 int riscos_using_threads = 0;
    40 int riscos_using_threads = 0;
    41 Uint32 riscos_main_thread = 0;  /* Thread running events */
    41 SDL_threadID riscos_main_thread = 0;  /* Thread running events */
    42 #endif
    42 #endif
    43 
    43 
    44 
    44 
    45 static void *
    45 static void *
    46 RunThread(void *data)
    46 RunThread(void *data)
    97         pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, &oldstate);
    97         pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, &oldstate);
    98     }
    98     }
    99 #endif
    99 #endif
   100 }
   100 }
   101 
   101 
   102 /* WARNING:  This may not work for systems with 64-bit pid_t */
   102 SDL_threadID
   103 Uint32
       
   104 SDL_ThreadID(void)
   103 SDL_ThreadID(void)
   105 {
   104 {
   106     return ((Uint32) pthread_self());
   105     return ((SDL_threadID) pthread_self());
   107 }
   106 }
   108 
   107 
   109 void
   108 void
   110 SDL_SYS_WaitThread(SDL_Thread * thread)
   109 SDL_SYS_WaitThread(SDL_Thread * thread)
   111 {
   110 {