- thr_act = THR_ACT_NULL;
- for (inc = (thread_act_t)queue_first(&task->threads);
- !queue_end(&task->threads, (queue_entry_t)inc);
- inc = ninc) {
-
- if (inc != thact) {
- ninc = (thread_act_t)queue_next(&inc->task_threads);
- continue;
- }
- th = act_lock_thread(inc);
- if ((inc->active) &&
- ((th->state & (TH_ABORT|TH_ABORT_SAFELY)) != TH_ABORT)) {
- found = 1;
- thr_act = inc;
- break;
- }
- act_unlock_thread(inc);
- /* ninc = (thread_act_t)queue_next(&inc->thr_acts); */
+ for (inc = (thread_t)queue_first(&task->threads);
+ !queue_end(&task->threads, (queue_entry_t)inc); ) {
+ if (inc == thread) {
+ thread_mtx_lock(inc);
+
+ if (inc->active &&
+ (inc->state & (TH_ABORT|TH_ABORT_SAFELY)) != TH_ABORT) {
+ result = KERN_SUCCESS;