include/SDL_atomic.h
changeset 7191 75360622e65f
parent 7004 18d4df6942c2
child 7393 358696c354a8
     1.1 --- a/include/SDL_atomic.h	Sat May 18 12:48:50 2013 -0700
     1.2 +++ b/include/SDL_atomic.h	Sat May 18 14:17:52 2013 -0700
     1.3 @@ -21,25 +21,25 @@
     1.4  
     1.5  /**
     1.6   * \file SDL_atomic.h
     1.7 - * 
     1.8 + *
     1.9   * Atomic operations.
    1.10 - * 
    1.11 + *
    1.12   * IMPORTANT:
    1.13   * If you are not an expert in concurrent lockless programming, you should
    1.14   * only be using the atomic lock and reference counting functions in this
    1.15   * file.  In all other cases you should be protecting your data structures
    1.16   * with full mutexes.
    1.17 - * 
    1.18 + *
    1.19   * The list of "safe" functions to use are:
    1.20   *  SDL_AtomicLock()
    1.21   *  SDL_AtomicUnlock()
    1.22   *  SDL_AtomicIncRef()
    1.23   *  SDL_AtomicDecRef()
    1.24 - * 
    1.25 + *
    1.26   * Seriously, here be dragons!
    1.27   * ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    1.28   *
    1.29 - * You can find out a little more about lockless programming and the 
    1.30 + * You can find out a little more about lockless programming and the
    1.31   * subtle issues that can arise here:
    1.32   * http://msdn.microsoft.com/en-us/library/ee418650%28v=vs.85%29.aspx
    1.33   *
    1.34 @@ -72,14 +72,12 @@
    1.35  
    1.36  /* Set up for C function definitions, even when using C++ */
    1.37  #ifdef __cplusplus
    1.38 -/* *INDENT-OFF* */
    1.39  extern "C" {
    1.40 -/* *INDENT-ON* */
    1.41  #endif
    1.42  
    1.43  /**
    1.44   * \name SDL AtomicLock
    1.45 - * 
    1.46 + *
    1.47   * The atomic locks are efficient spinlocks using CPU instructions,
    1.48   * but are vulnerable to starvation and can spin forever if a thread
    1.49   * holding a lock has been terminated.  For this reason you should
    1.50 @@ -98,7 +96,7 @@
    1.51  
    1.52  /**
    1.53   * \brief Try to lock a spin lock by setting it to a non-zero value.
    1.54 - * 
    1.55 + *
    1.56   * \param lock Points to the lock.
    1.57   *
    1.58   * \return SDL_TRUE if the lock succeeded, SDL_FALSE if the lock is already held.
    1.59 @@ -107,7 +105,7 @@
    1.60  
    1.61  /**
    1.62   * \brief Lock a spin lock by setting it to a non-zero value.
    1.63 - * 
    1.64 + *
    1.65   * \param lock Points to the lock.
    1.66   */
    1.67  extern DECLSPEC void SDLCALL SDL_AtomicLock(SDL_SpinLock *lock);
    1.68 @@ -304,9 +302,7 @@
    1.69  
    1.70  /* Ends C function definitions when using C++ */
    1.71  #ifdef __cplusplus
    1.72 -/* *INDENT-OFF* */
    1.73  }
    1.74 -/* *INDENT-ON* */
    1.75  #endif
    1.76  
    1.77  #include "close_code.h"