Subversion Repositories Kolibri OS

Rev

Rev 1964 | Rev 3031 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1964 Rev 2003
Line 32... Line 32...
32
 
32
 
33
#define __LOCK_IRQ(lock) \
33
#define __LOCK_IRQ(lock) \
Line 34... Line 34...
34
  do { local_irq_disable(); __LOCK(lock); } while (0)
34
  do { local_irq_disable(); __LOCK(lock); } while (0)
-
 
35
 
-
 
36
#define __LOCK_IRQSAVE(lock, flags) \
-
 
37
  do {                              \
-
 
38
     __asm__ __volatile__ (         \
-
 
39
     "pushf\n\t"                    \
35
 
40
     "popl %0\n\t"                  \
-
 
41
     "cli\n"                        \
-
 
42
     : "=r" (flags));               \
Line 36... Line 43...
36
#define __LOCK_IRQSAVE(lock, flags) \
43
      __LOCK(lock);                 \
37
  do { local_irq_save(flags); __LOCK(lock); } while (0)
44
       } while (0)                  \
Line 38... Line 45...
38
 
45
 
Line 45... Line 52...
45
 
52
 
46
#define __UNLOCK_IRQ(lock) \
53
#define __UNLOCK_IRQ(lock) \
Line 47... Line 54...
47
  do { local_irq_enable(); __UNLOCK(lock); } while (0)
54
  do { local_irq_enable(); __UNLOCK(lock); } while (0)
-
 
55
 
-
 
56
#define __UNLOCK_IRQRESTORE(lock, flags)    \
48
 
57
  do {                                      \
-
 
58
     if (flags & (1<<9))                    \
-
 
59
        __asm__ __volatile__ ("sti");       \
Line 49... Line 60...
49
#define __UNLOCK_IRQRESTORE(lock, flags) \
60
      __UNLOCK(lock);                       \
50
  do { local_irq_restore(flags); __UNLOCK(lock); } while (0)
61
     } while (0)
51
 
62
 
52
#define _spin_lock(lock)			__LOCK(lock)
63
#define _spin_lock(lock)			__LOCK(lock)