- task_lock(task);
- if (--task->ref_count > 0) {
- /*
- * A new reference appeared (probably from the pset).
- * Back out. Must unfreeze inline since we'already
- * dropped our reference.
- */
-#if MACH_HOST
- assert(task->may_assign == FALSE);
- task->may_assign = TRUE;
- if (task->assign_active == TRUE) {
- task->assign_active = FALSE;
- thread_wakeup((event_t)&task->assign_active);
- }
-#endif /* MACH_HOST */
- task_unlock(task);
- pset_unlock(pset);
- return;
- }