linux 2.6.23时钟中断与调度分析(4)
TIMER_INITIALIZER():
1):TIMER_INITIALIZER()用来声明一个定时器,它的定义如下:
#define TIMER_INITIALIZER(_function, _expires, _data) { \
.function = (_function), \
.expires = (_expires), \
.data = (_data), \
.base = &boot_tvec_bases, \
}
注:在上章对里面的数据结构已经解释过了
2): mod_timer():修改定时器的到时时间
int mod_timer(struct timer_list *timer, unsigned long expires)
{
//如果该定时器没有定义fuction
BUG_ON(!timer->function);
timer_stats_timer_set_start_info(timer);
/*
* This is a common optimization triggered by the
* networking code - if the timer is re-modified
&nb
相关文档:
在linux vi中激活鼠标中键,实现滚动换行
转载自 http://www.cnblogs.com/starspace/archive/2009/05/15/1458050.html
先写个综述吧, 需要条件如下, 第一 vim的编译的时候打开了gpm_mouse支持, 第二 系统安装了gpm服务
-----------------------------------------
用以下命令打开鼠标:
:set mouse=a
否则 Vim ......
用linux C 下的函数调用创建中文目录、文件等,字符串的编码格式要求是utf-8格式的。
比如想要使用 int mkdir(const char *pathname, mode_t mode); 创建一个中文的目录。那么pathname的编码格式要求是utf-8的,而不能是gb3212/gbk的,否则就是乱码。
那么如果linux C下如何进行gbk<---->utf-8编码转换的编码装换的 ......
Linux的目录结构 etc: 配置文件,如inittab
proc: proc文件系统,系统运行过程映射,进程映射
设备驱动的两种方式: 直接编译进内核;以module插入
PC的Linux启动:BIOS->GRUB->KERNEL
SHELL编程
相当于DOS的批处理,可 ......
手动设置
#ifconfig etn0 192.168.1.2,设置网卡IP地址
或直接运行ifconfig,这时候要注意了,在网络接口中有一个lo接口,也就是网络回环(loopback).
再使用ping命令
#ping 192.168.1.2 -c 3
测试3次,看能否正常响应.
启动与关闭网卡
/etc/rc.d/init.d/network restart <===重新启动网络
ifup eth0 &l ......