MCPcopy Create free account
hub / github.com/HelenOS/helenos / task_destroy

Function task_destroy

kernel/generic/src/proc/task.c:268–288  ·  view source on GitHub ↗

Destroy task. * * @param task Task to be destroyed. * */

Source from the content-addressed store, hash-verified

266 *
267 */
268void task_destroy(task_t *task)
269{
270 /*
271 * Remove the task from the task odict.
272 */
273 irq_spinlock_lock(&tasks_lock, true);
274 odict_remove(&task->ltasks);
275 irq_spinlock_unlock(&tasks_lock, true);
276
277 /*
278 * Perform architecture specific task destruction.
279 */
280 task_destroy_arch(task);
281
282 /*
283 * Drop our reference to the address space.
284 */
285 as_release(task->as);
286
287 slab_free(task_cache, task);
288}
289
290/** Hold a reference to a task.
291 *

Callers 3

program_createFunction · 0.85
task_releaseFunction · 0.85
ipc_connect_kboxFunction · 0.85

Calls 6

irq_spinlock_lockFunction · 0.85
irq_spinlock_unlockFunction · 0.85
as_releaseFunction · 0.85
slab_freeFunction · 0.85
odict_removeFunction · 0.50
task_destroy_archFunction · 0.50

Tested by

no test coverage detected