今天有点热,继续看源码
2011-05-10 18:41
232 查看
1、wc原来也是一个命令啊,前几天就见到了。
我猜 word count 的缩写吧
2、通过结构成员的地址,得到结构本身的地址
/**
* list_entry - get the struct for this entry
* @ptr: the &struct list_head pointer.
* @type: the type of the struct this is embedded in.
* @member: the name of the list_struct within the struct.
*/
#define list_entry(ptr, type, member) /
container_of(ptr, type, member)
3、查看linux版本
(1)uname 命令:查看系统信息
(2)cat /proc/version uname是不是直接用的这个啊
4、typeof关键字
是不是和sizeof是兄弟啊,其实差不多的,sizeof()是去得到大小,而typeof()是得到类型
typeof是gcc对C语言的一个扩展保留字,用于声明变量类型,比方说:
typeof(int *) p;
声明p为一个int类型的指针
typeof(*x) p;
声明p为x所指向的类型
我猜 word count 的缩写吧
2、通过结构成员的地址,得到结构本身的地址
/**
* list_entry - get the struct for this entry
* @ptr: the &struct list_head pointer.
* @type: the type of the struct this is embedded in.
* @member: the name of the list_struct within the struct.
*/
#define list_entry(ptr, type, member) /
container_of(ptr, type, member)
3、查看linux版本
(1)uname 命令:查看系统信息
(2)cat /proc/version uname是不是直接用的这个啊
4、typeof关键字
是不是和sizeof是兄弟啊,其实差不多的,sizeof()是去得到大小,而typeof()是得到类型
typeof是gcc对C语言的一个扩展保留字,用于声明变量类型,比方说:
typeof(int *) p;
声明p为一个int类型的指针
typeof(*x) p;
声明p为x所指向的类型
相关文章推荐
- 今天有点不开心
- 21天战拖记——Day5:今天继续复习《随机过程》!(2014-05-08)
- 【转】Android - 带暂停,继续,重置功能的简易倒计时器-附jpg源码
- 今天遇到了一个问题,将应用程序从服务器读取到的电话号码存储到通讯录中,必须在真机上跑,有点小激动。
- karloop介绍--hello world大家好,今天为大家介绍一款非常轻量级的的web开发框架,karloop框架。使用python开发 首先我们下载karloop源码进行安装。 源码地址 下载成
- 惭愧,今天看了jdk源码,才彻底明白为什么覆盖了equals()也要覆盖hashCode()
- 今天发现CSDNBLOG有点问题。
- 偷懒了一天,去给人装系统去了~ 今天继续更 自己敲代码实现下拉刷新上滑加载更多
- 今天学得有点多——end用法
- 今天老婆回家了,有点想她;身体还有些不舒服,写完就要去睡觉了,明天还有课了
- 今天有点晕,碰到了好几个老朋友,谈了不少话
- 今天效率很低, 明天继续
- 今天下雨了,有点郁闷小雨下个不停刚刚给我妈打了电话,我整一个人跟丢了魂似地很难受,心情极度压抑啊!...
- 今天休息,明天晚上继续IOS版本mmsplayer V2
- Antlr源码没下来,今天没啥成果
- 今天继续到北京出差
- Cocos2dx游戏开发笔记21:动手学习《Flappy Bird》之继续优化(付源码)
- 酷狗音乐模仿还在继续之UI界面源码下载
- 21天战拖记——Day5:今天继续复习《随机过程》!(2014-05-08)
- 今天有点冲动