标签:
tack_struct结构图:
1
2 3 4 5 6 |
union task_union
{ struct task_struct task; unsigned long stack[2048]; };
|
1
2 3 4 5 6 7 8 |
static inline struct task_struct *get_current(void)
{ struct task_struct *current; __asm__("andl %%esp,%0; ":"=r" (current) : "0" (~8191UL)); return current; } |
1
2 3 4 |
#define PIDHASH_SZ (4096 >> 2)
extern struct task_struct *pidhash[PIDHASH_SZ]; #define pid_hashfn(x) ((((x) >> 8) ^ (x)) & (PIDHASH_SZ - 1)) |
【Linux】进程控制块PCD结构(tack_struct)
标签:
原文地址:http://blog.csdn.net/scenlyf/article/details/51644307