QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1812|回复: 2

set_task_state?

[复制链接]
发表于 2003-6-11 11:56:37 | 显示全部楼层 |阅读模式
[code:1]#ifdef CONFIG_SMP
#define set_task_state(tsk, state_value)                \
        set_mb((tsk)->state, (state_value))
#else
#define set_task_state(tsk, state_value)                \
        __set_task_state((tsk), (state_value))
#endif[/code:1]
为什么SMP的调用xchgb,而UP就是一条赋值语句。
是不是xchgb能保证硬件原子操作,而mov不能?
发表于 2003-6-11 21:53:16 | 显示全部楼层
i do not remember what is xchgb mean. where can i find an instruction set reference ebook? thx
回复

使用道具 举报

 楼主| 发表于 2003-6-12 09:48:36 | 显示全部楼层
在ULK2里,3.2.1 提到这个set_task_state,我check了一下source,找到这两个定义。在linux/sched.h中
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-6-29 13:02 , Processed in 0.107291 second(s), 16 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表