??????Щ?????????趨?????????????????linux??????fork????????????????????????????????????????????????????Щ????????Щ???????????е????????????????????????????task_struct???????г??????????


linux/arch/arm/kernel/init_task.c

struct task_struct init_task = INIT_TASK(init_task);

#define INIT_TASK(tsk)
{        
 ...
 .signal  = &init_signals??   
 ...  
}
 


????init_signals????????£?


#define INIT_SIGNALS(sig) {
 .count  = ATOMIC_INIT(1)??  
 .wait_chldexit = __WAIT_QUEUE_HEAD_INITIALIZER(sig.wait_chldexit)??
 .shared_pending = {    
  .list = LIST_HEAD_INIT(sig.shared_pending.list)??
  .signal =  {{0}}}??
 .posix_timers  = LIST_HEAD_INIT(sig.posix_timers)?? 
 .cpu_timers = INIT_CPU_TIMERS(sig.cpu_timers)?? 
 .rlim  = INIT_RLIMITS??    
}

includeasm-generic esource.h
#define INIT_RLIMITS      
{        
 [RLIMIT_CPU]  = {  RLIM_INFINITY??  RLIM_INFINITY }??
 [RLIMIT_FSIZE]  = {  RLIM_INFINITY??  RLIM_INFINITY }??
 [RLIMIT_DATA]  = {  RLIM_INFINITY??  RLIM_INFINITY }??
 [RLIMIT_STACK]  = {       _STK_LIM??   _STK_LIM_MAX }??
 [RLIMIT_CORE]  = {              0??  RLIM_INFINITY }??
 [RLIMIT_RSS]  = {  RLIM_INFINITY??  RLIM_INFINITY }??
 [RLIMIT_NPROC]  = {              0??              0 }??
 [RLIMIT_NOFILE]  = {       INR_OPEN??       INR_OPEN }??
 [RLIMIT_MEMLOCK] = {    MLOCK_LIMIT??    MLOCK_LIMIT }??
 [RLIMIT_AS]  = {  RLIM_INFINITY??  RLIM_INFINITY }??
 [RLIMIT_LOCKS]  = {  RLIM_INFINITY??  RLIM_INFINITY }??
 [RLIMIT_SIGPENDING] = {   0??        0 }??
 [RLIMIT_MSGQUEUE] = {   MQ_BYTES_MAX??   MQ_BYTES_MAX }??
 [RLIMIT_NICE]  = { 0?? 0 }??   
 [RLIMIT_RTPRIO]  = { 0?? 0 }??   
}

#define NR_OPEN (1024*1024) /* Absolute upper limit on fd num */
#define INR_OPEN 1024  /* Initial setting for nfile rlimits */
 


????????????????????????rlim_cur = 1024???????????????1024???????