add: (void) new_mstate(curthread, LMS_SLEEP);
context: shuttle_resume(kthread_t *t, kmutex_t *l){	klwp_t	*lwp = ttolwp(curthread);	cpu_t	*cp;	extern disp_lock_t	shuttle_lock;	thread_lock(curthread);	disp_lock_enter_high(&shuttle_lock);	if (lwp != NULL) {		lwp->lwp_asleep = 1;			/* /proc */		lwp->lwp_sysabort = 0;			/* /proc */		lwp->lwp_ru.nvcsw++;	}	curthread->t_flag |= T_WAKEABLE;	curthread->t_sobj_ops = &shuttle_sobj_ops;	/*	 * setting cpu_dispthread before changing thread state	 * so that kernel preemption will be deferred to after swtch_to()	 */	cp = CPU;	cp->cpu_dispthread = t;	cp->cpu_dispatch_pri = DISP_PRIO(t);	/*	 * Set the wchan0 field so that /proc won't just do a setrun	 * on this thread when trying to stop a process. Instead,	 * /proc will mark the thread as VSTOPPED similar to threads	 * that are blocked on user level condition variables.	 */	curthread->t_wchan0 = (caddr_t)1;	CL_INACTIVE(curthread);	DTRACE_SCHED1(wakeup, kthread_t *, t);	DTRACE_SCHED(sleep);	THREAD_SLEEP(curthread, &shuttle_lock);	/* Update ustate records (there is no waitrq obviously) */	(void) new_mstate(curthread, LMS_SLEEP);	restore_mstate(t);	t->t_flag &= ~T_WAKEABLE;	t->t_wchan0 = NULL;	t->t_sobj_ops = NULL;	/*	 * We re-assign t_disp_queue and t_lockp of 't' here because	 * 't' could have been preempted.	 */	if (t->t_disp_queue != cp->cpu_disp) {		t->t_disp_queue = cp->cpu_disp;		thread_onproc(t, cp);	}	/*	 * Make sure we end up on the right CPU if we are dealing with bound	 * CPU's or processor partitions.	 */	if (t->t_bound_cpu != NULL || t->t_cpupart != cp->cpu_part) {		aston(t);		cp->cpu_runrun = 1;	}	disp_lock_exit_high(&shuttle_lock);	mutex_exit(l);	/*	 * Make sure we didn't receive any important events while	 * we weren't looking	 */	if (lwp &&	    (ISSIG(curthread, JUSTLOOKING) || MUSTRETURN(curproc, curthread)))		setrun(curthread);	swtch_to(t);	/*	 * Caller must check for ISSIG/lwp_sysabort conditions	 * and clear lwp->lwp_asleep/lwp->lwp_sysabort	 */}