Lines Matching defs:newkse
84 struct kse *newkse, *kse;
103 newkse = _kse_alloc(curthread, 0);
104 if (newkse == NULL) {
109 newkse->k_kseg = _kse_initial->k_kseg;
110 newkse->k_schedq = _kse_initial->k_schedq;
111 newkse->k_curthread = NULL;
113 KSE_SCHED_LOCK(curthread->kse, newkse->k_kseg);
114 TAILQ_INSERT_TAIL(&newkse->k_kseg->kg_kseq,
115 newkse, k_kgqe);
116 newkse->k_kseg->kg_ksecount++;
117 newkse->k_flags |= KF_STARTED;
118 KSE_SCHED_UNLOCK(curthread->kse, newkse->k_kseg);
119 if (kse_create(&newkse->k_kcb->kcb_kmbx, 0) != 0) {
120 KSE_SCHED_LOCK(curthread->kse, newkse->k_kseg);
121 TAILQ_REMOVE(&newkse->k_kseg->kg_kseq,
122 newkse, k_kgqe);
123 newkse->k_kseg->kg_ksecount--;
125 newkse->k_kseg);
127 _kse_free(curthread, newkse);