Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/proc/thread.c

    r7ed8530 re535eeb  
    11/*
    2  * Copyright (c) 2010 Jakub Jermar
     2 * Copyright (c) 2001-2004 Jakub Jermar
    33 * All rights reserved.
    44 *
     
    409409
    410410        /*
    411          * Drop the reference to the containing task.
     411         * t is guaranteed to be the very last thread of its task.
     412         * It is safe to destroy the task.
    412413         */
    413         task_release(t->task);
     414        if (atomic_predec(&t->task->refcount) == 0)
     415                task_destroy(t->task);
    414416       
    415417        slab_free(thread_slab, t);
     
    434436        spinlock_lock(&task->lock);
    435437
    436         /* Hold a reference to the task. */
    437         task_hold(task);
     438        atomic_inc(&task->refcount);
    438439
    439440        /* Must not count kbox thread into lifecount */
Note: See TracChangeset for help on using the changeset viewer.