src/events/SDL_events.c
changeset 6977 b73d51026c68
parent 6949 4de584a3a027
child 7037 3fedf1f25b94
     1.1 --- a/src/events/SDL_events.c	Thu Mar 07 15:37:08 2013 -0800
     1.2 +++ b/src/events/SDL_events.c	Thu Mar 07 20:12:40 2013 -0800
     1.3 @@ -212,7 +212,7 @@
     1.4      }
     1.5      /* Lock the event queue */
     1.6      used = 0;
     1.7 -    if (!SDL_EventQ.lock || SDL_mutexP(SDL_EventQ.lock) == 0) {
     1.8 +    if (!SDL_EventQ.lock || SDL_LockMutex(SDL_EventQ.lock) == 0) {
     1.9          if (action == SDL_ADDEVENT) {
    1.10              for (i = 0; i < numevents; ++i) {
    1.11                  used += SDL_AddEvent(&events[i]);
    1.12 @@ -242,7 +242,7 @@
    1.13                  }
    1.14              }
    1.15          }
    1.16 -        SDL_mutexV(SDL_EventQ.lock);
    1.17 +        SDL_UnlockMutex(SDL_EventQ.lock);
    1.18      } else {
    1.19          SDL_SetError("Couldn't lock event queue");
    1.20          used = -1;
    1.21 @@ -285,7 +285,7 @@
    1.22  #endif
    1.23  
    1.24      /* Lock the event queue */
    1.25 -    if (SDL_mutexP(SDL_EventQ.lock) == 0) {
    1.26 +    if (SDL_LockMutex(SDL_EventQ.lock) == 0) {
    1.27          int spot = SDL_EventQ.head;
    1.28          while (spot != SDL_EventQ.tail) {
    1.29              Uint32 type = SDL_EventQ.event[spot].type;
    1.30 @@ -295,7 +295,7 @@
    1.31                  spot = (spot + 1) % MAXEVENTS;
    1.32              }
    1.33          }
    1.34 -        SDL_mutexV(SDL_EventQ.lock);
    1.35 +        SDL_UnlockMutex(SDL_EventQ.lock);
    1.36      }
    1.37  }
    1.38  
    1.39 @@ -446,7 +446,7 @@
    1.40  void
    1.41  SDL_FilterEvents(SDL_EventFilter filter, void *userdata)
    1.42  {
    1.43 -    if (SDL_mutexP(SDL_EventQ.lock) == 0) {
    1.44 +    if (SDL_LockMutex(SDL_EventQ.lock) == 0) {
    1.45          int spot;
    1.46  
    1.47          spot = SDL_EventQ.head;
    1.48 @@ -458,7 +458,7 @@
    1.49              }
    1.50          }
    1.51      }
    1.52 -    SDL_mutexV(SDL_EventQ.lock);
    1.53 +    SDL_UnlockMutex(SDL_EventQ.lock);
    1.54  }
    1.55  
    1.56  Uint8