在2.6的内核上允许内核栈的大小在4K和8K之间选择,于是,根据内核 的配置,在thread_info.h中,加入了下面的一段代码 #ifdef CONFIG_4KSTACKS #define THREAD_SIZE (4096) #else #define THREAD_SIZE (8192) 这个大小的不同会影响内核堆栈的表示方法和current宏的实现,详见下面 首先,看看内核栈在表达方法上的差异 在2.6中 union thread_union { struct thread_info thread_info; unsigne...
by KYlinux - Linux文档专区 - 2008-07-14 11:14:44 阅读(973) 回复(0)
本帖最后由 hellolwq 于 2012-07-16 12:57 编辑 x86 64下面,使用内核2.6.30。 current宏用于内核模块获取当前运行的进程结构体,展开为:[code]movq %%gs:0xb000,%0 [/code]比如得到地址可能是:ffff88007d0c9870 但是将段寄存器gs打印出来,发现其值为0, 16位段描述符号的TI位如果为0则为GDT,这里GS为全0,只能是GDT里面的第一项,也就是空描述符那项。 手册里面明明写着使用空描述符赋值可以,用来寻址就报错啊。。。 询...
最近在学习Linux内核(Linux2.6.33),看到current宏的时候,就想动手实现current的重定向,这样以实现自己在特定函数的一个特殊功能。通常情况下,current宏是获取当前进程的进程描述符的地址,而我现在需要做的就是使用current宏获取指定进程的进程的描述地址。 在比较早的内核版本中,current宏以前是通过如下汇编指令实现的:movl $-8192,%eax; andl %esp, %eax来实现的,但是Linux2.6.33中current的宏的实现是调用了...
今天再次读到了《情景分析》中的do_page_fault函数。对其中的一些代码感到比较疑惑。 struct task_struct *tsk; tsk = current; 对于上面的这句代码感到不解。do_page_fault是由系统产生一个异常的时候调用的一个服务程序,显然操作系统处于内核态。 current最终会调用到下面的current_thread_info函数 static inline struct thread_info *current_thread_info(void) { register unsigned long sp asm ("sp"); return (str...
就是指向当前运行的进程的指针,用source insight看2.26.22的源代码时找到了在scripts\kconfig中的定义,是一个指向struct menu的指针。 不知道是不是这个,谢谢。
請問 Sybase 有沒有像 DB2 的 current timestamp 這種特殊字串啊? 因為我用 current timestamp 結果就變成 "current timestamp"字串而不是當時的時間戳記(但是DB2是可以的) thx 有先用 timestamp 搜尋過版面了,但是找不到資料只好發帖來問... 在線等待 :)
用smart setup引导盘启动机器显示"Smart setup utlity doesnot suppport the current platform". 是我的smart setup(4.8.3)版本太低还是什么原因,那位大大给说说。 RX2600的机器
Everyday, Louis Vuitton replica handbags you can purchase them as you like,which made in China, without any notification from anyone except you and Bags-replica.com.You have to acknowledgethat in China, Replica Handbags there is highly skill of imitation.You can inspect your replica handbags with a magnifirer,you probably find out that we rarely miss every detail with artisan’s eagle-eyed pas...