: -  !

       , -  
 Linux  .  ,      ,
   ,      , ,   
  .      ,  
 ,      ,     (-
).   !

-      (
  ,       ).
     ,   ,  -
   (       ), 
    (     -
).       ,   -
    ,     ,
        . 
   (spin),    .  
,  ,   ,   , 
    .   
( ),     .  , 
      .  
    (    ,  -
)       ,     
,   ,   ,     .

  ,     
   .     .

spinlock_t mr_lock = SPIN_LOCK_UNLOCKED;

unsigned long flags;

spin lock irqsave(&mr lock, flags);

/*   ... */

spin unlock irqrestore(Smr lock, flags);

 spin_lock_irqsave ()    
,      . 
spin_unlock_irqrestore () , ,     -
    .  ,  -
  ,       . , 
 flags   .  ,    -
    .

        -
,        -
 ,      .  
        -
 .

    185