~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Linux Cross Reference
Linux/include/asm-s390/smplock.h

Version: ~ [ 2.4.0 ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*
  2  *  include/asm-s390/smplock.h
  3  *
  4  *  S390 version
  5  *
  6  *  Derived from "include/asm-i386/smplock.h"
  7  */
  8 
  9 #include <linux/interrupt.h>
 10 #include <asm/spinlock.h>
 11 
 12 extern spinlock_t kernel_flag;
 13 
 14 /*
 15  * Release global kernel lock and global interrupt lock
 16  */
 17 #define release_kernel_lock(task, cpu)     \
 18 do {                                       \
 19         if (task->lock_depth >= 0)         \
 20                 spin_unlock(&kernel_flag); \
 21         release_irqlock(cpu);              \
 22         __sti();                           \
 23 } while (0)
 24 
 25 /*
 26  * Re-acquire the kernel lock
 27  */
 28 #define reacquire_kernel_lock(task)        \
 29 do {                                       \
 30         if (task->lock_depth >= 0)         \
 31                 spin_lock(&kernel_flag);   \
 32 } while (0)
 33 
 34 
 35 /*
 36  * Getting the big kernel lock.
 37  *
 38  * This cannot happen asynchronously,
 39  * so we only need to worry about other
 40  * CPU's.
 41  */
 42 /*
 43  * Getting the big kernel lock.
 44  *
 45  * This cannot happen asynchronously,
 46  * so we only need to worry about other
 47  * CPU's.
 48  */
 49 extern __inline__ void lock_kernel(void)
 50 {
 51         if (!++current->lock_depth)
 52                 spin_lock(&kernel_flag);
 53 }
 54 
 55 extern __inline__ void unlock_kernel(void)
 56 {
 57         if (--current->lock_depth < 0)
 58                 spin_unlock(&kernel_flag);
 59 }
 60 
 61 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.