当我查看 Linux 内核代码时,发现以下代码:
struct thread_info {
struct task_struct *task;
struct exec_domain *exec_domain;
unsigned long flags;
__u32 status;
__u32 cpu;
int preempt_count;
mm_segment_t addr_limit;
struct restart_block restart_block;
void __user *sysenter_return;
unsigned long previous_esp;
__u8 supervisor_stack[0];
};
注意最后一个变量“supervisor_stack”,它是一个零长度数组,它的用途是什么?提前致谢!