- 论坛徽章:
- 0
|
Redhat9+VPC
展开前:
spin_lock_irqsave(&devc->lock, flags);
展开后:
do { do { __asm__ __volatile__("pushfl ; popl %0":"=g" (flags): ); __asm__ __volatile__("cli": : :"memory"); } while(0);; (void)(&devc->lock); } while (0);
展开过程:
#define spin_lock_irqsave(lock, flags) do { local_irq_save(flags); spin_lock(lock); } while (0)
#define local_irq_save(x) __save_and_cli(x)
#define __save_and_cli(x) do { __save_flags(x); __cli(); } while(0);
#define __save_flags(x) __asm__ __volatile__("pushfl ; popl %0":"=g" (x): /* no input */)
#define __cli() __asm__ __volatile__("cli": : :"memory")
#define spin_lock(lock) (void)(lock) /* Not "unused variable". */
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/117/showart_317231.html |
|