Changeset 62b6d17 in mainline for kernel/generic/src/proc/task.c


Ignore:
Timestamp:
2006-12-14T16:47:36Z (17 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
aeaebcc
Parents:
55cc9bc
Message:

introduce uncounted threads, whose accounting doesn't affect accumulated task accounting
run tests in kconsole thread again

File:
1 edited

Legend:

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

    r55cc9bc r62b6d17  
    221221         * Create the main thread.
    222222         */
    223         t1 = thread_create(uinit, kernel_uarg, task, THREAD_FLAG_USPACE, "uinit");
     223        t1 = thread_create(uinit, kernel_uarg, task, THREAD_FLAG_USPACE, "uinit", false);
    224224        ASSERT(t1);
    225225       
     
    227227         * Create killer thread for the new task.
    228228         */
    229         t2 = thread_create(ktaskgc, t1, task, 0, "ktaskgc");
     229        t2 = thread_create(ktaskgc, t1, task, 0, "ktaskgc", true);
    230230        ASSERT(t2);
    231231        thread_ready(t2);
     
    286286               
    287287                spinlock_lock(&thr->lock);
    288                
    289                 if (thr == THREAD) /* Update accounting of current thread */
    290                         thread_update_accounting();
    291                 ret += thr->cycles;
    292                
     288                /* Process only counted threads */
     289                if (!thr->uncounted) {
     290                        if (thr == THREAD) /* Update accounting of current thread */
     291                                thread_update_accounting();
     292                        ret += thr->cycles;
     293                }
    293294                spinlock_unlock(&thr->lock);
    294295        }
     
    329330        spinlock_unlock(&tasks_lock);
    330331       
    331         t = thread_create(ktaskclnp, NULL, ta, 0, "ktaskclnp");
     332        t = thread_create(ktaskclnp, NULL, ta, 0, "ktaskclnp", true);
    332333       
    333334        spinlock_lock(&ta->lock);
Note: See TracChangeset for help on using the changeset viewer.