Ignore:
File:
1 edited

Legend:

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

    r577f042a rdf58e44  
    338338       
    339339        thread->interrupted = false;
     340        thread->btrace = false;
    340341        thread->detached = false;
    341342        waitq_initialize(&thread->join_wq);
     
    350351       
    351352#ifdef CONFIG_UDEBUG
    352         /* Initialize debugging stuff */
    353         thread->btrace = false;
     353        /* Init debugging stuff */
    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        
    599593#ifdef __32_BITS__
    600594        if (*additional)
    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);
     595                printf("%-8" PRIu64" %10p %9" PRIu64 "%c %9" PRIu64 "%c ",
     596                    thread->tid, thread->kstack, ucycles, usuffix,
     597                    kcycles, ksuffix);
    604598        else
    605                 printf("%-8" PRIu64" %-14s %10p %-8s %10p %-5" PRIu32 "\n",
    606                     thread->tid, name, thread, thread_states[thread->state],
     599                printf("%-8" PRIu64" %-14s %10p %-8s %10p %-5" PRIu32 " %10p\n",
     600                    thread->tid, thread->name, thread, thread_states[thread->state],
    607601                    thread->task, thread->task->context, thread->thread_code);
    608602#endif
     
    616610        else
    617611                printf("%-8" PRIu64" %-14s %18p %-8s %18p %-5" PRIu32 "\n",
    618                     thread->tid, name, thread, thread_states[thread->state],
     612                    thread->tid, thread->name, thread, thread_states[thread->state],
    619613                    thread->task, thread->task->context);
    620614#endif
     
    654648#ifdef __32_BITS__
    655649        if (additional)
    656                 printf("[id    ] [code    ] [stack   ] [ucycles ] [kcycles ]"
    657                     " [cpu] [waitqueue]\n");
     650                printf("[id    ] [stack   ] [ucycles ] [kcycles ] [cpu]"
     651                    " [waitqueue]\n");
    658652        else
    659653                printf("[id    ] [name        ] [address ] [state ] [task    ]"
    660                     " [ctx]\n");
     654                    " [ctx] [code    ]\n");
    661655#endif
    662656       
     
    757751        return iterator.thread;
    758752}
    759 
    760 #ifdef CONFIG_UDEBUG
    761753
    762754void thread_stack_trace(thread_id_t thread_id)
     
    802794        irq_spinlock_unlock(&threads_lock, true);
    803795}
    804 
    805 #endif /* CONFIG_UDEBUG */
    806796
    807797/** Process syscall to create new thread.
Note: See TracChangeset for help on using the changeset viewer.