Print this page
patch delete-t_stime
patch remove-load-flag
patch remove-dont-swap-flag


 412         if (kmem_stackinfo != 0) {
 413                 stkinfo_begin(t);
 414         }
 415 
 416         t->t_ts = ts;
 417 
 418         /*
 419          * p_cred could be NULL if it thread_create is called before cred_init
 420          * is called in main.
 421          */
 422         mutex_enter(&pp->p_crlock);
 423         if (pp->p_cred)
 424                 crhold(t->t_cred = pp->p_cred);
 425         mutex_exit(&pp->p_crlock);
 426         t->t_start = gethrestime_sec();
 427         t->t_startpc = proc;
 428         t->t_procp = pp;
 429         t->t_clfuncs = &sys_classfuncs.thread;
 430         t->t_cid = syscid;
 431         t->t_pri = pri;
 432         t->t_stime = ddi_get_lbolt();
 433         t->t_schedflag = TS_LOAD | TS_DONT_SWAP;
 434         t->t_bind_cpu = PBIND_NONE;
 435         t->t_bindflag = (uchar_t)default_binding_mode;
 436         t->t_bind_pset = PS_NONE;
 437         t->t_plockp = &pp->p_lock;
 438         t->t_copyops = NULL;
 439         t->t_taskq = NULL;
 440         t->t_anttime = 0;
 441         t->t_hatdepth = 0;
 442 
 443         t->t_dtrace_vtime = 1;       /* assure vtimestamp is always non-zero */
 444 
 445         CPU_STATS_ADDQ(CPU, sys, nthreads, 1);
 446 #ifndef NPROBE
 447         /* Kernel probe */
 448         tnf_thread_create(t);
 449 #endif /* NPROBE */
 450         LOCK_INIT_CLEAR(&t->t_lock);
 451 
 452         /*
 453          * Callers who give us a NULL proc must do their own




 412         if (kmem_stackinfo != 0) {
 413                 stkinfo_begin(t);
 414         }
 415 
 416         t->t_ts = ts;
 417 
 418         /*
 419          * p_cred could be NULL if it thread_create is called before cred_init
 420          * is called in main.
 421          */
 422         mutex_enter(&pp->p_crlock);
 423         if (pp->p_cred)
 424                 crhold(t->t_cred = pp->p_cred);
 425         mutex_exit(&pp->p_crlock);
 426         t->t_start = gethrestime_sec();
 427         t->t_startpc = proc;
 428         t->t_procp = pp;
 429         t->t_clfuncs = &sys_classfuncs.thread;
 430         t->t_cid = syscid;
 431         t->t_pri = pri;
 432         t->t_schedflag = 0;

 433         t->t_bind_cpu = PBIND_NONE;
 434         t->t_bindflag = (uchar_t)default_binding_mode;
 435         t->t_bind_pset = PS_NONE;
 436         t->t_plockp = &pp->p_lock;
 437         t->t_copyops = NULL;
 438         t->t_taskq = NULL;
 439         t->t_anttime = 0;
 440         t->t_hatdepth = 0;
 441 
 442         t->t_dtrace_vtime = 1;       /* assure vtimestamp is always non-zero */
 443 
 444         CPU_STATS_ADDQ(CPU, sys, nthreads, 1);
 445 #ifndef NPROBE
 446         /* Kernel probe */
 447         tnf_thread_create(t);
 448 #endif /* NPROBE */
 449         LOCK_INIT_CLEAR(&t->t_lock);
 450 
 451         /*
 452          * Callers who give us a NULL proc must do their own