linux kernel current宏
来源:互联网 发布:淘宝企业店铺税务申报 编辑:程序博客网 时间:2024/05/01 00:36
1,先看个示意图吧.
2,每个进程在内核态下都会开辟一个内核栈,一般就是8KB,一般把thread_info这个结构体和
内核栈放在一起,这样内核就可以很方便从ESP寄存器中获取当前CPU上正在运行的thread_info
结构体的首地址,通过thread_info就可以找到PCB了。这个PCB就是当前进程的PCB。
将esp中的值屏蔽掉末尾的13位即是thread_info的首地址。
3,每个进程都有个thread_info这个结构,这个结构和task_struct是一一对应的。
具体的字段如下:(linux-2.6.38)
26 struct thread_info { 27 struct task_struct *task; /* main task structure */ 28 struct exec_domain *exec_domain; /* execution domain */ 29 __u32 flags; /* low level flags */ 30 __u32 status; /* thread synchronous flags */ 31 __u32 cpu; /* current CPU */ 32 int preempt_count; /* 0 => preemptable, 33 <0 => BUG */ 34 mm_segment_t addr_limit; 35 struct restart_block restart_block; 36 void __user *sysenter_return; 37 #ifdef CONFIG_X86_32 38 unsigned long previous_esp; /* ESP of the previous stack in 39 case of nested (IRQ) stacks 40 */ 41 __u8 supervisor_stack[0]; 42 #endif 43 int uaccess_err; 44 };
- linux kernel current宏
- linux kernel current宏
- linux kernel current宏
- linux kernel current宏
- Linux Kernel Source - current 宏
- Under Linux kernel 2.6.35, getting current time(accuracy macrosenconds).
- Unable to Find Sources for Current Linux Kernel
- Some optimization in current kernel
- linux current
- VirtualBox安装VBoxLinuxAdditions错误:unable to find the sources of your current linux kernel
- VirtualBox安装VBoxLinuxAdditions错误:unable to find the sources of your current linux kernel
- kali 安装virtualbox tools出错ERROR: UNABLE TO FIND THE SOURCES OF YOUR CURRENT LINUX KERNEL.
- VirtualBox安装VBoxLinuxAdditions错误:unable to find the sources of your current linux kernel
- Linux kernel contain_of 宏
- unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make a
- current宏
- current宏
- Linux kernel 中的per_cpu宏
- 背照式和堆栈式摄像头元件的区别
- ILayer 接口
- mini2440的组成结构
- 那些不能错过的xcode插件
- 最终还是拆了ibus 安上 fcitx 了
- linux kernel current宏
- 学习VB.NET 变量命名三原则
- uva 10106 Product
- 编译系统与解释系统
- 笔试练习题
- POJ 2115 (C Looooops)
- 字符串匹配算法
- Cocos2d-x 一边执行动作序列一边播放动画
- 给定一个数组,数组中有正负数,求出所有字数组中和值最大的值。