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

Linux/Unix编程

开发平台:

Unix_Linux

  1. /*
  2.  *  arch/s390/lib/misaligned.c
  3.  *    S390 misalignment panic stubs
  4.  *
  5.  *  S390 version
  6.  *    Copyright (C) 2001 IBM Deutschland Entwicklung GmbH, IBM Corporation
  7.  *    Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com).
  8.  *
  9.  * xchg wants to panic if the pointer is not aligned. To avoid multiplying
  10.  * the panic message over and over again, the panic is done in the helper
  11.  * functions __misaligned_u32 and __misaligned_u16.
  12.  */
  13. #include <linux/module.h> 
  14. #include <linux/kernel.h>
  15. void __misaligned_u16(void)
  16. {
  17. panic("misaligned (__u16 *) in __xchgn");
  18. }
  19. void __misaligned_u32(void)
  20. {
  21. panic("misaligned (__u32 *) in __xchgn");
  22. }
  23. EXPORT_SYMBOL(__misaligned_u16);
  24. EXPORT_SYMBOL(__misaligned_u32);