Changeset bb252ca in mainline for kernel/generic/src/proc/thread.c


Ignore:
Timestamp:
2010-05-02T20:58:27Z (14 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4872160
Parents:
4ce914d4 (diff), 1624aae (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge the scheduler fix.

File:
1 edited

Legend:

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

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