src/atomic/SDL_atomic.c
changeset 7191 75360622e65f
parent 6978 e851407e9294
child 7394 38dc4961ab15
     1.1 --- a/src/atomic/SDL_atomic.c	Sat May 18 12:48:50 2013 -0700
     1.2 +++ b/src/atomic/SDL_atomic.c	Sat May 18 14:17:52 2013 -0700
     1.3 @@ -29,8 +29,8 @@
     1.4  */
     1.5  #undef SDL_AtomicCAS
     1.6  #undef SDL_AtomicCASPtr
     1.7 - 
     1.8 -/* 
     1.9 +
    1.10 +/*
    1.11    If any of the operations are not provided then we must emulate some
    1.12    of them. That means we need a nice implementation of spin locks
    1.13    that avoids the "one big lock" problem. We use a vector of spin
    1.14 @@ -40,7 +40,7 @@
    1.15    To generate the index of the lock we first shift by 3 bits to get
    1.16    rid on the zero bits that result from 32 and 64 bit allignment of
    1.17    data. We then mask off all but 5 bits and use those 5 bits as an
    1.18 -  index into the table. 
    1.19 +  index into the table.
    1.20  
    1.21    Picking the lock this way insures that accesses to the same data at
    1.22    the same time will go to the same lock. OTOH, accesses to different