include/SDL_mutex.h
branchSDL-1.3
changeset 1668 4da1ee79c9af
parent 1662 782fd950bd46
     1.1 --- a/include/SDL_mutex.h	Mon May 29 03:53:21 2006 +0000
     1.2 +++ b/include/SDL_mutex.h	Mon May 29 04:04:35 2006 +0000
     1.3 @@ -58,21 +58,21 @@
     1.4  typedef struct SDL_mutex SDL_mutex;
     1.5  
     1.6  /* Create a mutex, initialized unlocked */
     1.7 -extern DECLSPEC SDL_mutex *SDLCALL SDL_CreateMutex (void);
     1.8 +extern DECLSPEC SDL_mutex *SDLCALL SDL_CreateMutex(void);
     1.9  
    1.10  /* Lock the mutex  (Returns 0, or -1 on error) */
    1.11  #define SDL_LockMutex(m)	SDL_mutexP(m)
    1.12 -extern DECLSPEC int SDLCALL SDL_mutexP (SDL_mutex * mutex);
    1.13 +extern DECLSPEC int SDLCALL SDL_mutexP(SDL_mutex * mutex);
    1.14  
    1.15  /* Unlock the mutex  (Returns 0, or -1 on error)
    1.16     It is an error to unlock a mutex that has not been locked by
    1.17     the current thread, and doing so results in undefined behavior.
    1.18   */
    1.19  #define SDL_UnlockMutex(m)	SDL_mutexV(m)
    1.20 -extern DECLSPEC int SDLCALL SDL_mutexV (SDL_mutex * mutex);
    1.21 +extern DECLSPEC int SDLCALL SDL_mutexV(SDL_mutex * mutex);
    1.22  
    1.23  /* Destroy a mutex */
    1.24 -extern DECLSPEC void SDLCALL SDL_DestroyMutex (SDL_mutex * mutex);
    1.25 +extern DECLSPEC void SDLCALL SDL_DestroyMutex(SDL_mutex * mutex);
    1.26  
    1.27  
    1.28  /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
    1.29 @@ -84,21 +84,21 @@
    1.30  typedef struct SDL_semaphore SDL_sem;
    1.31  
    1.32  /* Create a semaphore, initialized with value, returns NULL on failure. */
    1.33 -extern DECLSPEC SDL_sem *SDLCALL SDL_CreateSemaphore (Uint32 initial_value);
    1.34 +extern DECLSPEC SDL_sem *SDLCALL SDL_CreateSemaphore(Uint32 initial_value);
    1.35  
    1.36  /* Destroy a semaphore */
    1.37 -extern DECLSPEC void SDLCALL SDL_DestroySemaphore (SDL_sem * sem);
    1.38 +extern DECLSPEC void SDLCALL SDL_DestroySemaphore(SDL_sem * sem);
    1.39  
    1.40  /* This function suspends the calling thread until the semaphore pointed 
    1.41   * to by sem has a positive count. It then atomically decreases the semaphore
    1.42   * count.
    1.43   */
    1.44 -extern DECLSPEC int SDLCALL SDL_SemWait (SDL_sem * sem);
    1.45 +extern DECLSPEC int SDLCALL SDL_SemWait(SDL_sem * sem);
    1.46  
    1.47  /* Non-blocking variant of SDL_SemWait(), returns 0 if the wait succeeds,
    1.48     SDL_MUTEX_TIMEDOUT if the wait would block, and -1 on error.
    1.49  */
    1.50 -extern DECLSPEC int SDLCALL SDL_SemTryWait (SDL_sem * sem);
    1.51 +extern DECLSPEC int SDLCALL SDL_SemTryWait(SDL_sem * sem);
    1.52  
    1.53  /* Variant of SDL_SemWait() with a timeout in milliseconds, returns 0 if
    1.54     the wait succeeds, SDL_MUTEX_TIMEDOUT if the wait does not succeed in
    1.55 @@ -106,15 +106,15 @@
    1.56     On some platforms this function is implemented by looping with a delay
    1.57     of 1 ms, and so should be avoided if possible.
    1.58  */
    1.59 -extern DECLSPEC int SDLCALL SDL_SemWaitTimeout (SDL_sem * sem, Uint32 ms);
    1.60 +extern DECLSPEC int SDLCALL SDL_SemWaitTimeout(SDL_sem * sem, Uint32 ms);
    1.61  
    1.62  /* Atomically increases the semaphore's count (not blocking), returns 0,
    1.63     or -1 on error.
    1.64   */
    1.65 -extern DECLSPEC int SDLCALL SDL_SemPost (SDL_sem * sem);
    1.66 +extern DECLSPEC int SDLCALL SDL_SemPost(SDL_sem * sem);
    1.67  
    1.68  /* Returns the current count of the semaphore */
    1.69 -extern DECLSPEC Uint32 SDLCALL SDL_SemValue (SDL_sem * sem);
    1.70 +extern DECLSPEC Uint32 SDLCALL SDL_SemValue(SDL_sem * sem);
    1.71  
    1.72  
    1.73  /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
    1.74 @@ -126,27 +126,27 @@
    1.75  typedef struct SDL_cond SDL_cond;
    1.76  
    1.77  /* Create a condition variable */
    1.78 -extern DECLSPEC SDL_cond *SDLCALL SDL_CreateCond (void);
    1.79 +extern DECLSPEC SDL_cond *SDLCALL SDL_CreateCond(void);
    1.80  
    1.81  /* Destroy a condition variable */
    1.82 -extern DECLSPEC void SDLCALL SDL_DestroyCond (SDL_cond * cond);
    1.83 +extern DECLSPEC void SDLCALL SDL_DestroyCond(SDL_cond * cond);
    1.84  
    1.85  /* Restart one of the threads that are waiting on the condition variable,
    1.86     returns 0 or -1 on error.
    1.87   */
    1.88 -extern DECLSPEC int SDLCALL SDL_CondSignal (SDL_cond * cond);
    1.89 +extern DECLSPEC int SDLCALL SDL_CondSignal(SDL_cond * cond);
    1.90  
    1.91  /* Restart all threads that are waiting on the condition variable,
    1.92     returns 0 or -1 on error.
    1.93   */
    1.94 -extern DECLSPEC int SDLCALL SDL_CondBroadcast (SDL_cond * cond);
    1.95 +extern DECLSPEC int SDLCALL SDL_CondBroadcast(SDL_cond * cond);
    1.96  
    1.97  /* Wait on the condition variable, unlocking the provided mutex.
    1.98     The mutex must be locked before entering this function!
    1.99     The mutex is re-locked once the condition variable is signaled.
   1.100     Returns 0 when it is signaled, or -1 on error.
   1.101   */
   1.102 -extern DECLSPEC int SDLCALL SDL_CondWait (SDL_cond * cond, SDL_mutex * mut);
   1.103 +extern DECLSPEC int SDLCALL SDL_CondWait(SDL_cond * cond, SDL_mutex * mut);
   1.104  
   1.105  /* Waits for at most 'ms' milliseconds, and returns 0 if the condition
   1.106     variable is signaled, SDL_MUTEX_TIMEDOUT if the condition is not
   1.107 @@ -154,9 +154,8 @@
   1.108     On some platforms this function is implemented by looping with a delay
   1.109     of 1 ms, and so should be avoided if possible.
   1.110  */
   1.111 -extern DECLSPEC int SDLCALL SDL_CondWaitTimeout (SDL_cond * cond,
   1.112 -                                                 SDL_mutex * mutex,
   1.113 -                                                 Uint32 ms);
   1.114 +extern DECLSPEC int SDLCALL SDL_CondWaitTimeout(SDL_cond * cond,
   1.115 +                                                SDL_mutex * mutex, Uint32 ms);
   1.116  
   1.117  /* Ends C function definitions when using C++ */
   1.118  #ifdef __cplusplus