src/events/SDL_events.c
changeset 3578 0d1b16ee0bca
parent 3269 a67a961e2171
child 3611 57823d017f02
equal deleted inserted replaced
3577:72024425b437 3578:0d1b16ee0bca
    60     int safe;
    60     int safe;
    61 } SDL_EventLock;
    61 } SDL_EventLock;
    62 
    62 
    63 /* Thread functions */
    63 /* Thread functions */
    64 static SDL_Thread *SDL_EventThread = NULL;      /* Thread handle */
    64 static SDL_Thread *SDL_EventThread = NULL;      /* Thread handle */
    65 static Uint32 event_thread;     /* The event thread id */
    65 static SDL_threadID event_thread;     /* The event thread id */
    66 
    66 
    67 void
    67 void
    68 SDL_Lock_EventThread(void)
    68 SDL_Lock_EventThread(void)
    69 {
    69 {
    70     if (SDL_EventThread && (SDL_ThreadID() != event_thread)) {
    70     if (SDL_EventThread && (SDL_ThreadID() != event_thread)) {
   181         SDL_DestroyMutex(SDL_EventQ.lock);
   181         SDL_DestroyMutex(SDL_EventQ.lock);
   182         SDL_EventQ.lock = NULL;
   182         SDL_EventQ.lock = NULL;
   183     }
   183     }
   184 }
   184 }
   185 
   185 
   186 Uint32
   186 SDL_threadID
   187 SDL_EventThreadID(void)
   187 SDL_EventThreadID(void)
   188 {
   188 {
   189     return (event_thread);
   189     return (event_thread);
   190 }
   190 }
   191 
   191