linux kernel current宏
来源:互联网 发布:javascript隐藏按钮 编辑:程序博客网 时间:2024/05/01 01:55
linux kernel current宏
2012-04-15 10:46:23| 分类:linux 进程与进程 | 标签:|字号大中小 订阅
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宏
- 微软之走向死亡
- ActionContext类-与Servlet API解耦的访问方式
- Android用ImageView显示本地和网上的图片
- 如何限制Linux用户的进程数呢?
- 传统媒体及报纸应该从Reddit身上学习什么?
- linux kernel current宏
- java程序调用外部exe程序的实现
- ubuntu修改hosts文件
- Android210 最新开机logo
- hdu 1712 分组背包
- poj 1062 昂贵的聘礼
- windows编程---临界区对象
- 把图片切成圆角的代码
- Android开发中的压力测试工具Monkey