当前位置: 技术问答>linux和unix
看看下面一段代码
来源: 互联网 发布时间:2015-07-13
本文导语: #define ___swab16(x) ({ __u16 __x = (x); ((__u16)( (((__u16)(__x) & (__u16)0x00ffU) 8) )); }) (__u16)0x00ffU 是什么意思,是将0x00ffU强制转化为__u16吗?,后面那个U是什么意思,是unsigned的意思? 请问big_endian与little_endian到...
#define ___swab16(x)
({
__u16 __x = (x);
((__u16)(
(((__u16)(__x) & (__u16)0x00ffU) 8) ));
})
(__u16)0x00ffU 是什么意思,是将0x00ffU强制转化为__u16吗?,后面那个U是什么意思,是unsigned的意思?
请问big_endian与little_endian到底取决于什么,机器的CPU吗?操作系统? 能举例说明哪些是用的big_endian,哪些是little_endian?谢谢!
({
__u16 __x = (x);
((__u16)(
(((__u16)(__x) & (__u16)0x00ffU) 8) ));
})
(__u16)0x00ffU 是什么意思,是将0x00ffU强制转化为__u16吗?,后面那个U是什么意思,是unsigned的意思?
请问big_endian与little_endian到底取决于什么,机器的CPU吗?操作系统? 能举例说明哪些是用的big_endian,哪些是little_endian?谢谢!
|
1、是的
2、取决于CPU
2、取决于CPU
|
tianxiangyuan(潇湘夜雨)
是对的,再补充点
UL ULL
相应意思也就明白了
以下摘自msdn
Intel-based machines store data in the reverse order of Macintosh (Motorola) machines. Intel’s byte order, called “little-Endian,” is also the reverse of the network standard “big-Endian” order.
是对的,再补充点
UL ULL
相应意思也就明白了
以下摘自msdn
Intel-based machines store data in the reverse order of Macintosh (Motorola) machines. Intel’s byte order, called “little-Endian,” is also the reverse of the network standard “big-Endian” order.
您可能感兴趣的文章:
本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。