The task_struct of linux kernel 0.11

本文详细解析了 Linux 内核 0.11 中的任务结构 task_struct,介绍了该结构中各字段的功能及作用,包括任务状态、信号处理、文件系统信息等关键内容。


The task_struct of linux kernel 0.11
struct task_struct {
/* these are hardcoded - don't touch */
    
long state;    /* -1 unrunnable, 0 runnable, >0 stopped */
    
long counter;
    
long priority;
    
long signal;
    
struct sigaction sigaction[32];
    
long blocked;    /* bitmap of masked signals */
/* various fields */
    
int exit_code;
    unsigned 
long start_code,end_code,end_data,brk,start_stack;
    
long pid,father,pgrp,session,leader;
    unsigned 
short uid,euid,suid;
    unsigned 
short gid,egid,sgid;
    
long alarm;
    
long utime,stime,cutime,cstime,start_time;
    unsigned 
short used_math;
/* file system info */
    
int tty;        /* -1 if no tty, so it must be signed */
    unsigned 
short umask;
    
struct m_inode * pwd;
    
struct m_inode * root;
    
struct m_inode * executable;
    unsigned 
long close_on_exec;
    
struct file * filp[NR_OPEN];
/* ldt for this task 0 - zero 1 - cs 2 - ds&ss */
    
struct desc_struct ldt[3];
/* tss for this task */
    
struct tss_struct tss;
};


转载于:https://www.cnblogs.com/BpLoveGcy/archive/2007/03/07/667099.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值