为何此task非比task
时间:2011-03-11
来源:互联网
pagefault 时,用mm 通过container_of找到 当前mm对应的struct task_struct,
然后和current 对应的task进行比较,发现竟然不一样。
我想这两个地址应该是一样的,不解!
strcut task_struct *tsk;
tsk = container_of(&mm,struct task_struct, mm);
printk(KERN_ERR"in %s line:%d &mm:%p tsk:%p current:%p \n",\
__FILE__,__LINE__,&mm,tsk,current);
打印的结果:
&mm:de495e14 tsk:de495d20 current:de43ed80
然后和current 对应的task进行比较,发现竟然不一样。
我想这两个地址应该是一样的,不解!
strcut task_struct *tsk;
tsk = container_of(&mm,struct task_struct, mm);
printk(KERN_ERR"in %s line:%d &mm:%p tsk:%p current:%p \n",\
__FILE__,__LINE__,&mm,tsk,current);
打印的结果:
&mm:de495e14 tsk:de495d20 current:de43ed80
作者: rocky1972 发布时间: 2011-03-11
呵呵,想到了,mm 是一个局部变量,并非task->mm 的那个成员
作者: rocky1972 发布时间: 2011-03-11
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28