   32-  ,    -
  .     24-     
     SPARC,        
<asm/atomic.h>    .

 ,      
,     <asm/atomic.h>.   -
    ,   
  ,       
 ,     .    
 ,      
    .

   atomic_t   . 
      .

atomic t u; /*    */

atomic t v = ATOMIC INIT(O); /*   v 

     */

    .

atomic_set(&v, 4); /* v = 4 () */
atomic add(2, &v) ; /*v=v+2=6 () */
atomic inc(&v); /* v = v + 1 = 7 () */

    atomic_t   int,   -
  atomic_read().

printk("%d\n", atomic read(&v)); /*   "7" */

       
 .        -
  ,     atomic_int () 
atomic_dec (),   .    
         -
.         -
 ,   

int atomic dec and test(atomic_t *v) .

        
.      ,   
true,   false.       -
  (.. ,      )  
. 9.1.  ,      -
,    <asm/atomic.h>.

        
      (  
inline).    -     -
,       . ,   -
         
 .       
 "    ,   ,  

    179