801,8 → 801,16 |
} |
|
spinlock_lock(&ta->kb_cleanup_lock); |
|
if (ta->kb_finished != false) { |
spinlock_unlock(&ta->kb_cleanup_lock); |
spinlock_unlock(&tasks_lock); |
interrupts_restore(ipl); |
return EINVAL; |
} |
|
spinlock_unlock(&tasks_lock); |
|
/* |
* Only ta->kb_cleanup_lock left. Since we checked the value |
* of ta->kb_finished, this suffices to ensure the task's exitence. |
810,12 → 818,6 |
* mutual exclusion with other threads running this function. |
*/ |
|
if (ta->kb_finished != false) { |
spinlock_unlock(&ta->kb_cleanup_lock); |
interrupts_restore(ipl); |
return EINVAL; |
} |
|
/* Connect the newly allocated phone to the kbox */ |
ipc_phone_connect(&TASK->phones[newphid], &ta->kernel_box); |
|