ChinaUnix.net
相关文章推荐:

u boot中attribute

__attribute__ 机制作用: 可以设置函数属性(Function attribute), 变量属性(Variable attribute), 类型屬性(Type attribute) 语法: __attribute__ (parameter) 注: attribute 前后各有两个下划线(underscore) 后面紧跟小括号((bracket)), 括号间为 __attribute__参数. 其位置一般于声明的尾部";" 以前。 函数属性(Function attribute) 函数属性可以帮助开发者把一些特性添加到函数声明,从而可以使编译...

by neilengineer - Linux文档专区 - 2009-09-16 19:23:43 阅读(620) 回复(0)

相关讨论

GNU C的一大特色就是__attribute__机制。GNU C扩展的__attribute__ 机制被用来设置函数属性(Function attribute)、变量属性(Variable attribute)和类型属性(Type attribute)。 __attribute__书写特征是:__attribute__前后都有两个下划线,并切后面会紧跟一对原括弧,括弧里面是相应的__attribute__参数。 __attribute__语法格式为: __attribute__ ((attribute-list)) 其位置约束为:放于声明的尾...

by pan915 - Linux文档专区 - 2010-01-11 15:38:43 阅读(716) 回复(0)

GNU C的一大特色就是__attribute__机制。GNU C扩展的__attribute__ 机制被用来设置函数属性(Function attribute)、变量属性(Variable attribute)和类型属性(Type attribute)。 __attribute__书写特征是:__attribute__前后都有两个下划线,并切后面会紧跟一对原括弧,括弧里面是相应的__attribute__参数。 __attribute__语法格式为: __attribute__ ((attribute-list)) 其位置约束为:放于声明的尾...

by pan915 - Linux文档专区 - 2010-01-11 15:34:12 阅读(633) 回复(0)

引用: __attrubte__ ((packed)) 的作用就是告诉编译器取消结构在编译过程的优化对齐,按照实际占用字节数进行对齐。 #define __u8 unsigned char #define __u16 unsigned short /* __attribute__ ((packed)) 的位置约束是放于声明的尾部“;”之前 */ struct str_struct{ __u8 a; __u8 b; __u8 c; __u16 d; } __attribute__ ((packed)); /* 当用到typedef时,要特别注意__attri...

by heijita - Linux文档专区 - 2009-11-28 18:42:09 阅读(694) 回复(0)

关于linux内核的"__attribute__ ((packed))" 来源: http://jimmy-lee.blog.hexun.com/8001013_d.html __attrubte__ ((packed)) 的作用就是告诉编译器取消结构在编译过程的优化对齐,按照实际占用字节数进行对齐。 #define __u8 unsigned char #define __u16 unsigned short /* __attribute__ ((packed)) 的位置约束是放于声明的尾部“;”之前 */ struct str_struct{ __u8 a; __u8 b; __...

by I-linux - Linux文档专区 - 2009-04-14 13:39:04 阅读(535) 回复(0)

关于linux内核的"__attribute__ ((packed))" 来源: http://jimmy-lee.blog.hexun.com/8001013_d.html __attrubte__ ((packed)) 的作用就是告诉编译器取消结构在编译过程的优化对齐,按照实际占用字节数进行对齐。 #define __u8 unsigned char #define __u16 unsigned short /* __attribute__ ((packed)) 的位置约束是放于声明的尾部“;”之前 */ struct str_struct{ __u8 a; __u8 b; _...

by mlch1816 - SCO文档中心 - 2015-05-18 17:51:17 阅读(18708) 回复(3)

GNC CC 是一个功能非常强大的跨平台 C 编译器,它对 C 语言提供了很多扩展, 这些扩展对优化、目标代码布局、更安全的检查等方面提供了很强的支持。本文把 支持 GNU 扩展的 C 语言称为 GNU C。 Linux 内核代码使用了大量的 GNU C 扩展,以至于能够编译 Linux 内核的唯一编 译器是 GNU CC,以前甚至出现过编译 Linux 内核要使用特殊的 GNU CC 版本的情 况。本文是对 Linux 内核使用的 GNU C 扩展的一个汇总,希望当你读内核源...

by vicegod - Linux文档专区 - 2007-04-16 19:41:16 阅读(523) 回复(0)

__attribute__((bitwise)) __attribute__((force)) 是什么意思? 在gcc文档没有找到。 他们用来在big-endian 和 little-edian 之间做强制转换

by zqy2000zqy - C/C++ - 2006-05-30 14:52:26 阅读(995) 回复(2)

我觉得gcc的关键字__attribute__和有意思,其用处也很广范,十分希望哪位老师讲述讲述!

by sc_px_jiangyun - 程序开发 - 2006-04-07 10:58:38 阅读(856) 回复(2)

我觉得gcc的关键字__attribute__和有意思,其用处也很广范,十分希望哪位老师讲述讲述!

by sc_px_jiangyun - Linux环境编程 - 2006-04-07 10:58:38 阅读(1491) 回复(2)

在RHES3.0上安装了OpenLdap2.2.17。 现在想增加User type,unique ID,user fullname这三个attribute,请问该怎样做?

by ericshen1002 - Linux论坛 - 2005-02-24 14:41:51 阅读(604) 回复(0)