Lines Matching refs:sth
148 smb_thread_t *sth) in smb_thread_start() argument
152 smb_server_t *sv = sth->sth_server; in smb_thread_start()
155 ASSERT(sth->sth_magic == SMB_THREAD_MAGIC); in smb_thread_start()
160 mutex_enter(&sth->sth_mtx); in smb_thread_start()
161 if (sth->sth_state != SMB_THREAD_STATE_EXITED) { in smb_thread_start()
162 mutex_exit(&sth->sth_mtx); in smb_thread_start()
165 sth->sth_state = SMB_THREAD_STATE_STARTING; in smb_thread_start()
166 mutex_exit(&sth->sth_mtx); in smb_thread_start()
169 if (sth->sth_pri < MINCLSYSPRI) { in smb_thread_start()
170 t = lwp_kernel_create(procp, smb_thread_entry_point, sth, in smb_thread_start()
171 TS_RUN, sth->sth_pri); in smb_thread_start()
175 t = thread_create(NULL, 0, smb_thread_entry_point, sth, in smb_thread_start()
176 0, procp, TS_RUN, sth->sth_pri); in smb_thread_start()
180 mutex_enter(&sth->sth_mtx); in smb_thread_start()
181 sth->sth_th = t; in smb_thread_start()
182 sth->sth_did = THR_TO_DID(t); in smb_thread_start()
185 while (sth->sth_state == SMB_THREAD_STATE_STARTING) in smb_thread_start()
186 cv_wait(&sth->sth_cv, &sth->sth_mtx); in smb_thread_start()
187 if (sth->sth_state == SMB_THREAD_STATE_RUNNING) in smb_thread_start()
191 mutex_exit(&sth->sth_mtx); in smb_thread_start()