spinlock_api_smp.h
上传用户:szlgq88
上传日期:2009-04-28
资源大小:48287k
文件大小:3k
源码类别:

嵌入式Linux

开发平台:

Unix_Linux

  1. #ifndef __LINUX_SPINLOCK_API_SMP_H
  2. #define __LINUX_SPINLOCK_API_SMP_H
  3. #ifndef __LINUX_SPINLOCK_H
  4. # error "please don't include this file directly"
  5. #endif
  6. /*
  7.  * include/linux/spinlock_api_smp.h
  8.  *
  9.  * spinlock API declarations on SMP (and debug)
  10.  * (implemented in kernel/spinlock.c)
  11.  *
  12.  * portions Copyright 2005, Red Hat, Inc., Ingo Molnar
  13.  * Released under the General Public License (GPL).
  14.  */
  15. int in_lock_functions(unsigned long addr);
  16. #define assert_spin_locked(x) BUG_ON(!spin_is_locked(x))
  17. void __lockfunc _spin_lock(spinlock_t *lock) __acquires(spinlock_t);
  18. void __lockfunc _read_lock(rwlock_t *lock) __acquires(rwlock_t);
  19. void __lockfunc _write_lock(rwlock_t *lock) __acquires(rwlock_t);
  20. void __lockfunc _spin_lock_bh(spinlock_t *lock) __acquires(spinlock_t);
  21. void __lockfunc _read_lock_bh(rwlock_t *lock) __acquires(rwlock_t);
  22. void __lockfunc _write_lock_bh(rwlock_t *lock) __acquires(rwlock_t);
  23. void __lockfunc _spin_lock_irq(spinlock_t *lock) __acquires(spinlock_t);
  24. void __lockfunc _read_lock_irq(rwlock_t *lock) __acquires(rwlock_t);
  25. void __lockfunc _write_lock_irq(rwlock_t *lock) __acquires(rwlock_t);
  26. unsigned long __lockfunc _spin_lock_irqsave(spinlock_t *lock)
  27. __acquires(spinlock_t);
  28. unsigned long __lockfunc _read_lock_irqsave(rwlock_t *lock)
  29. __acquires(rwlock_t);
  30. unsigned long __lockfunc _write_lock_irqsave(rwlock_t *lock)
  31. __acquires(rwlock_t);
  32. int __lockfunc _spin_trylock(spinlock_t *lock);
  33. int __lockfunc _read_trylock(rwlock_t *lock);
  34. int __lockfunc _write_trylock(rwlock_t *lock);
  35. int __lockfunc _spin_trylock_bh(spinlock_t *lock);
  36. void __lockfunc _spin_unlock(spinlock_t *lock) __releases(spinlock_t);
  37. void __lockfunc _read_unlock(rwlock_t *lock) __releases(rwlock_t);
  38. void __lockfunc _write_unlock(rwlock_t *lock) __releases(rwlock_t);
  39. void __lockfunc _spin_unlock_bh(spinlock_t *lock) __releases(spinlock_t);
  40. void __lockfunc _read_unlock_bh(rwlock_t *lock) __releases(rwlock_t);
  41. void __lockfunc _write_unlock_bh(rwlock_t *lock) __releases(rwlock_t);
  42. void __lockfunc _spin_unlock_irq(spinlock_t *lock) __releases(spinlock_t);
  43. void __lockfunc _read_unlock_irq(rwlock_t *lock) __releases(rwlock_t);
  44. void __lockfunc _write_unlock_irq(rwlock_t *lock) __releases(rwlock_t);
  45. void __lockfunc _spin_unlock_irqrestore(spinlock_t *lock, unsigned long flags)
  46. __releases(spinlock_t);
  47. void __lockfunc _read_unlock_irqrestore(rwlock_t *lock, unsigned long flags)
  48. __releases(rwlock_t);
  49. void __lockfunc _write_unlock_irqrestore(rwlock_t *lock, unsigned long flags)
  50. __releases(rwlock_t);
  51. #endif /* __LINUX_SPINLOCK_API_SMP_H */