unaligned.h
上传用户:jlfgdled
上传日期:2013-04-10
资源大小:33168k
文件大小:1k
源码类别:

Linux/Unix编程

开发平台:

Unix_Linux

  1. #ifndef _ASM_PARISC_UNALIGNED_H_
  2. #define _ASM_PARISC_UNALIGNED_H_
  3. /* parisc can't handle unaligned accesses. */
  4. /* copied from asm-sparc/unaligned.h */
  5. #include <linux/string.h>
  6. /* Use memmove here, so gcc does not insert a __builtin_memcpy. */
  7. #define get_unaligned(ptr) 
  8.   ({ __typeof__(*(ptr)) __tmp; memmove(&__tmp, (ptr), sizeof(*(ptr))); __tmp; })
  9. #define put_unaligned(val, ptr)
  10.   ({ __typeof__(*(ptr)) __tmp = (val);
  11.      memmove((ptr), &__tmp, sizeof(*(ptr)));
  12.      (void)0; })
  13. #ifdef __KERNEL__
  14. struct pt_regs;
  15. void handle_unaligned(struct pt_regs *regs);
  16. int check_unaligned(struct pt_regs *regs);
  17. #endif
  18. #endif /* _ASM_PARISC_UNALIGNED_H_ */