src/thread/pth/SDL_sysmutex.c
branchSDL-1.3
changeset 1668 4da1ee79c9af
parent 1662 782fd950bd46
     1.1 --- a/src/thread/pth/SDL_sysmutex.c	Mon May 29 03:53:21 2006 +0000
     1.2 +++ b/src/thread/pth/SDL_sysmutex.c	Mon May 29 04:04:35 2006 +0000
     1.3 @@ -34,58 +34,58 @@
     1.4  
     1.5  /* Create a mutex */
     1.6  SDL_mutex *
     1.7 -SDL_CreateMutex (void)
     1.8 +SDL_CreateMutex(void)
     1.9  {
    1.10      SDL_mutex *mutex;
    1.11  
    1.12      /* Allocate mutex memory */
    1.13 -    mutex = (SDL_mutex *) SDL_malloc (sizeof (*mutex));
    1.14 +    mutex = (SDL_mutex *) SDL_malloc(sizeof(*mutex));
    1.15      if (mutex) {
    1.16          /* Create the mutex, with initial value signaled */
    1.17 -        if (!pth_mutex_init (&(mutex->mutexpth_p))) {
    1.18 -            SDL_SetError ("Couldn't create mutex");
    1.19 -            SDL_free (mutex);
    1.20 +        if (!pth_mutex_init(&(mutex->mutexpth_p))) {
    1.21 +            SDL_SetError("Couldn't create mutex");
    1.22 +            SDL_free(mutex);
    1.23              mutex = NULL;
    1.24          }
    1.25      } else {
    1.26 -        SDL_OutOfMemory ();
    1.27 +        SDL_OutOfMemory();
    1.28      }
    1.29      return (mutex);
    1.30  }
    1.31  
    1.32  /* Free the mutex */
    1.33  void
    1.34 -SDL_DestroyMutex (SDL_mutex * mutex)
    1.35 +SDL_DestroyMutex(SDL_mutex * mutex)
    1.36  {
    1.37      if (mutex) {
    1.38 -        SDL_free (mutex);
    1.39 +        SDL_free(mutex);
    1.40      }
    1.41  }
    1.42  
    1.43  /* Lock the mutex */
    1.44  int
    1.45 -SDL_mutexP (SDL_mutex * mutex)
    1.46 +SDL_mutexP(SDL_mutex * mutex)
    1.47  {
    1.48      if (mutex == NULL) {
    1.49 -        SDL_SetError ("Passed a NULL mutex");
    1.50 +        SDL_SetError("Passed a NULL mutex");
    1.51          return -1;
    1.52      }
    1.53  
    1.54 -    pth_mutex_acquire (&(mutex->mutexpth_p), FALSE, NULL);
    1.55 +    pth_mutex_acquire(&(mutex->mutexpth_p), FALSE, NULL);
    1.56  
    1.57      return (0);
    1.58  }
    1.59  
    1.60  /* Unlock the mutex */
    1.61  int
    1.62 -SDL_mutexV (SDL_mutex * mutex)
    1.63 +SDL_mutexV(SDL_mutex * mutex)
    1.64  {
    1.65      if (mutex == NULL) {
    1.66 -        SDL_SetError ("Passed a NULL mutex");
    1.67 +        SDL_SetError("Passed a NULL mutex");
    1.68          return -1;
    1.69      }
    1.70  
    1.71 -    pth_mutex_release (&(mutex->mutexpth_p));
    1.72 +    pth_mutex_release(&(mutex->mutexpth_p));
    1.73  
    1.74      return (0);
    1.75  }