home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2006 November (DVD) / PCWELT_11_2006.ISO / casper / filesystem.squashfs / usr / src / linux-headers-2.6.17-6 / include / asm-powerpc / synch.h < prev    next >
Encoding:
C/C++ Source or Header  |  2006-08-11  |  642 b   |  37 lines

  1. #ifndef _ASM_POWERPC_SYNCH_H 
  2. #define _ASM_POWERPC_SYNCH_H 
  3. #ifdef __KERNEL__
  4.  
  5. #include <linux/stringify.h>
  6.  
  7. #ifdef __powerpc64__
  8. #define __SUBARCH_HAS_LWSYNC
  9. #endif
  10.  
  11. #ifdef __SUBARCH_HAS_LWSYNC
  12. #    define LWSYNC    lwsync
  13. #else
  14. #    define LWSYNC    sync
  15. #endif
  16.  
  17. #ifdef CONFIG_SMP
  18. #define ISYNC_ON_SMP    "\n\tisync\n"
  19. #define LWSYNC_ON_SMP    __stringify(LWSYNC) "\n"
  20. #else
  21. #define ISYNC_ON_SMP
  22. #define LWSYNC_ON_SMP
  23. #endif
  24.  
  25. static inline void eieio(void)
  26. {
  27.     __asm__ __volatile__ ("eieio" : : : "memory");
  28. }
  29.  
  30. static inline void isync(void)
  31. {
  32.     __asm__ __volatile__ ("isync" : : : "memory");
  33. }
  34.  
  35. #endif /* __KERNEL__ */
  36. #endif    /* _ASM_POWERPC_SYNCH_H */
  37.