Changeset a0bb10ef in mainline


Ignore:
Timestamp:
2006-03-23T11:49:11Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
303c94c
Parents:
281b607
Message:

Fix kcpulb() to change state of the migrated thread to Entering so that thread_ready() won't panic() on violated assertion.
Make print out of threads and tasks more dense again.

Location:
generic/src/proc
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • generic/src/proc/scheduler.c

    r281b607 ra0bb10ef  
    563563#endif
    564564                                t->flags |= X_STOLEN;
     565                                t->state = Entering;
    565566                                spinlock_unlock(&t->lock);
    566567       
  • generic/src/proc/task.c

    r281b607 ra0bb10ef  
    118118
    119119        as = as_create(0);
     120        ASSERT(as);
    120121
    121122        rc = elf_load((elf_header_t *) program_addr, as);
     
    133134       
    134135        task = task_create(as, name);
    135         t = thread_create(uinit, kernel_uarg, task, 0, "uinit");
    136        
     136        ASSERT(task);
     137
    137138        /*
    138139         * Create the data as_area.
    139140         */
    140141        a = as_area_create(as, AS_AREA_READ | AS_AREA_WRITE, PAGE_SIZE, USTACK_ADDRESS);
     142
     143        t = thread_create(uinit, kernel_uarg, task, 0, "uinit");
     144        ASSERT(t);
     145        thread_ready(t);
    141146       
    142         thread_ready(t);
    143 
    144147        return task;
    145148}
     
    160163                t = list_get_instance(cur, task_t, tasks_link);
    161164                spinlock_lock(&t->lock);
    162                 printf("%s: address=%P, taskid=%Q\n\tas=%P, ActiveCalls: %d",
     165                printf("%s: address=%P, taskid=%Q, as=%P, ActiveCalls: %d",
    163166                        t->name, t, t->taskid, t->as, atomic_get(&t->active_calls));
    164167                for (i=0; i < IPC_MAX_PHONES; i++) {
  • generic/src/proc/thread.c

    r281b607 ra0bb10ef  
    416416        for (cur=threads_head.next; cur!=&threads_head; cur=cur->next) {
    417417                t = list_get_instance(cur, thread_t, threads_link);
    418                 printf("%s: address=%P, tid=%d, state=%s\n\ttask=%P, code=%P, stack=%P, cpu=",
     418                printf("%s: address=%P, tid=%d, state=%s, task=%P, code=%P, stack=%P, cpu=",
    419419                        t->name, t, t->tid, thread_states[t->state], t->task, t->thread_code, t->kstack);
    420420                if (t->cpu)
Note: See TracChangeset for help on using the changeset viewer.