Changes in / [df58e44:5b7a107] in mainline


Ignore:
Location:
kernel/generic
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/proc/thread.h

    rdf58e44 r5b7a107  
    140140        bool interrupted;
    141141       
    142         /**
    143          * If true, the scheduler will print a stack trace
    144          * to the kernel console upon scheduling this thread.
    145          */
    146         bool btrace;
    147        
    148142        /** If true, thread_join_timeout() cannot be used on this thread. */
    149143        bool detached;
     
    196190       
    197191#ifdef CONFIG_UDEBUG
     192        /**
     193         * If true, the scheduler will print a stack trace
     194         * to the kernel console upon scheduling this thread.
     195         */
     196        bool btrace;
     197       
    198198        /** Debugging stuff */
    199199        udebug_thread_t udebug;
     
    245245extern void thread_update_accounting(bool);
    246246extern bool thread_exists(thread_t *);
     247
     248#ifdef CONFIG_UDEBUG
    247249extern void thread_stack_trace(thread_id_t);
     250#endif
    248251
    249252/** Fpu context slab cache. */
  • kernel/generic/src/console/cmd.c

    rdf58e44 r5b7a107  
    111111
    112112#ifdef CONFIG_TEST
     113
    113114/* Data and methods for 'test' command. */
    114115static char test_buf[MAX_CMDLINE + 1];
     
    148149        .argv = bench_argv
    149150};
    150 #endif
     151
     152#endif /* CONFIG_TEST */
    151153
    152154/* Data and methods for 'description' command. */
     
    383385};
    384386
     387#ifdef CONFIG_UDEBUG
     388
    385389/* Data and methods for 'btrace' command */
    386390static int cmd_btrace(cmd_arg_t *argv);
     
    395399        .argv = &btrace_argv
    396400};
     401
     402#endif /* CONFIG_UDEBUG */
    397403
    398404static int cmd_sched(cmd_arg_t *argv);
     
    492498
    493499static cmd_info_t *basic_commands[] = {
    494         &btrace_info,
    495500        &call0_info,
    496501        &mcall0_info,
     
    523528        &bench_info,
    524529#endif
     530#ifdef CONFIG_UDEBUG
     531        &btrace_info,
     532#endif
    525533        NULL
    526534};
     
    980988}
    981989
     990#ifdef CONFIG_UDEBUG
     991
    982992/** Command for printing thread stack trace
    983993 *
     
    9921002        return 1;
    9931003}
     1004
     1005#endif /* CONFIG_UDEBUG */
    9941006
    9951007/** Command for printing scheduler information
  • kernel/generic/src/proc/scheduler.c

    rdf58e44 r5b7a107  
    102102#endif
    103103       
     104#ifdef CONFIG_UDEBUG
    104105        if (THREAD->btrace) {
    105106                istate_t *istate = THREAD->udebug.uspace_state;
     
    111112                THREAD->btrace = false;
    112113        }
     114#endif
    113115}
    114116
  • kernel/generic/src/proc/thread.c

    rdf58e44 r5b7a107  
    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
     
    752752}
    753753
     754#ifdef CONFIG_UDEBUG
     755
    754756void thread_stack_trace(thread_id_t thread_id)
    755757{
     
    794796        irq_spinlock_unlock(&threads_lock, true);
    795797}
     798
     799#endif /* CONFIG_UDEBUG */
    796800
    797801/** Process syscall to create new thread.
Note: See TracChangeset for help on using the changeset viewer.