Ignore:
File:
1 edited

Legend:

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

    rdf58e44 r577f042a  
    338338       
    339339        thread->interrupted = false;
    340         thread->btrace = false;
    341340        thread->detached = false;
    342341        waitq_initialize(&thread->join_wq);
     
    351350       
    352351#ifdef CONFIG_UDEBUG
    353         /* Init debugging stuff */
     352        /* Initialize debugging stuff */
     353        thread->btrace = false;
    354354        udebug_thread_initialize(&thread->udebug);
    355355#endif
     
    591591        order_suffix(thread->kcycles, &kcycles, &ksuffix);
    592592       
     593        char *name;
     594        if (str_cmp(thread->name, "uinit") == 0)
     595                name = thread->task->name;
     596        else
     597                name = thread->name;
     598       
    593599#ifdef __32_BITS__
    594600        if (*additional)
    595                 printf("%-8" PRIu64" %10p %9" PRIu64 "%c %9" PRIu64 "%c ",
    596                     thread->tid, thread->kstack, ucycles, usuffix,
    597                     kcycles, ksuffix);
     601                printf("%-8 %10p" PRIu64" %10p %9" PRIu64 "%c %9" PRIu64 "%c ",
     602                    thread->tid, thread->thread_code, thread->kstack,
     603                    ucycles, usuffix, kcycles, ksuffix);
    598604        else
    599                 printf("%-8" PRIu64" %-14s %10p %-8s %10p %-5" PRIu32 " %10p\n",
    600                     thread->tid, thread->name, thread, thread_states[thread->state],
     605                printf("%-8" PRIu64" %-14s %10p %-8s %10p %-5" PRIu32 "\n",
     606                    thread->tid, name, thread, thread_states[thread->state],
    601607                    thread->task, thread->task->context, thread->thread_code);
    602608#endif
     
    610616        else
    611617                printf("%-8" PRIu64" %-14s %18p %-8s %18p %-5" PRIu32 "\n",
    612                     thread->tid, thread->name, thread, thread_states[thread->state],
     618                    thread->tid, name, thread, thread_states[thread->state],
    613619                    thread->task, thread->task->context);
    614620#endif
     
    648654#ifdef __32_BITS__
    649655        if (additional)
    650                 printf("[id    ] [stack   ] [ucycles ] [kcycles ] [cpu]"
    651                     " [waitqueue]\n");
     656                printf("[id    ] [code    ] [stack   ] [ucycles ] [kcycles ]"
     657                    " [cpu] [waitqueue]\n");
    652658        else
    653659                printf("[id    ] [name        ] [address ] [state ] [task    ]"
    654                     " [ctx] [code    ]\n");
     660                    " [ctx]\n");
    655661#endif
    656662       
     
    751757        return iterator.thread;
    752758}
     759
     760#ifdef CONFIG_UDEBUG
    753761
    754762void thread_stack_trace(thread_id_t thread_id)
     
    794802        irq_spinlock_unlock(&threads_lock, true);
    795803}
     804
     805#endif /* CONFIG_UDEBUG */
    796806
    797807/** Process syscall to create new thread.
Note: See TracChangeset for help on using the changeset viewer.