Answers:
使用grep
或任何其他搜索工具查找定义:
grep -r '^struct task_struct ' include
或通过LXR在线搜索:http : //lxr.linux.no/linux+v2.6.30.5/+search? search = task_struct
我正在使用Debian压缩。我在与当前内核相对应的标头中看到一个定义/usr/src/linux-headers-2.6.32-5-common-vserver/include/linux/sched.h
。定义始于
struct task_struct {
volatile long state; /* -1 unrunnable, 0 runnable, >0 stopped */
void *stack;
atomic_t usage;
unsigned int flags; /* per process flags, defined below */
unsigned int ptrace;
int lock_depth; /* BKL lock depth */
HTH。