⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 unaligned.h

📁 嵌入式系统设计与实例开发实验教材二源码 多线程应用程序设计 串行端口程序设计 AD接口实验 CAN总线通信实验 GPS通信实验 Linux内核移植与编译实验 IC卡读写实验 SD驱动使
💻 H
字号:
#ifndef __I386_UNALIGNED_H#define __I386_UNALIGNED_H/* * The i386 can do unaligned accesses itself.  * * The strange macros are there to make sure these can't * be misused in a way that makes them not work on other * architectures where unaligned accesses aren't as simple. *//** * get_unaligned - get value from possibly mis-aligned location * @ptr: pointer to value * * This macro should be used for accessing values larger in size than  * single bytes at locations that are expected to be improperly aligned,  * e.g. retrieving a u16 value from a location not u16-aligned. * * Note that unaligned accesses can be very expensive on some architectures. */#define get_unaligned(ptr) (*(ptr))/** * put_unaligned - put value to a possibly mis-aligned location * @val: value to place * @ptr: pointer to location * * This macro should be used for placing values larger in size than  * single bytes at locations that are expected to be improperly aligned,  * e.g. writing a u16 value to a location not u16-aligned. * * Note that unaligned accesses can be very expensive on some architectures. */#define put_unaligned(val, ptr) ((void)( *(ptr) = (val) ))#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -