Changes in / [df58e44:5b7a107] in mainline
- Location:
- kernel/generic
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/proc/thread.h
rdf58e44 r5b7a107 140 140 bool interrupted; 141 141 142 /**143 * If true, the scheduler will print a stack trace144 * to the kernel console upon scheduling this thread.145 */146 bool btrace;147 148 142 /** If true, thread_join_timeout() cannot be used on this thread. */ 149 143 bool detached; … … 196 190 197 191 #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 198 198 /** Debugging stuff */ 199 199 udebug_thread_t udebug; … … 245 245 extern void thread_update_accounting(bool); 246 246 extern bool thread_exists(thread_t *); 247 248 #ifdef CONFIG_UDEBUG 247 249 extern void thread_stack_trace(thread_id_t); 250 #endif 248 251 249 252 /** Fpu context slab cache. */ -
kernel/generic/src/console/cmd.c
rdf58e44 r5b7a107 111 111 112 112 #ifdef CONFIG_TEST 113 113 114 /* Data and methods for 'test' command. */ 114 115 static char test_buf[MAX_CMDLINE + 1]; … … 148 149 .argv = bench_argv 149 150 }; 150 #endif 151 152 #endif /* CONFIG_TEST */ 151 153 152 154 /* Data and methods for 'description' command. */ … … 383 385 }; 384 386 387 #ifdef CONFIG_UDEBUG 388 385 389 /* Data and methods for 'btrace' command */ 386 390 static int cmd_btrace(cmd_arg_t *argv); … … 395 399 .argv = &btrace_argv 396 400 }; 401 402 #endif /* CONFIG_UDEBUG */ 397 403 398 404 static int cmd_sched(cmd_arg_t *argv); … … 492 498 493 499 static cmd_info_t *basic_commands[] = { 494 &btrace_info,495 500 &call0_info, 496 501 &mcall0_info, … … 523 528 &bench_info, 524 529 #endif 530 #ifdef CONFIG_UDEBUG 531 &btrace_info, 532 #endif 525 533 NULL 526 534 }; … … 980 988 } 981 989 990 #ifdef CONFIG_UDEBUG 991 982 992 /** Command for printing thread stack trace 983 993 * … … 992 1002 return 1; 993 1003 } 1004 1005 #endif /* CONFIG_UDEBUG */ 994 1006 995 1007 /** Command for printing scheduler information -
kernel/generic/src/proc/scheduler.c
rdf58e44 r5b7a107 102 102 #endif 103 103 104 #ifdef CONFIG_UDEBUG 104 105 if (THREAD->btrace) { 105 106 istate_t *istate = THREAD->udebug.uspace_state; … … 111 112 THREAD->btrace = false; 112 113 } 114 #endif 113 115 } 114 116 -
kernel/generic/src/proc/thread.c
rdf58e44 r5b7a107 338 338 339 339 thread->interrupted = false; 340 thread->btrace = false;341 340 thread->detached = false; 342 341 waitq_initialize(&thread->join_wq); … … 351 350 352 351 #ifdef CONFIG_UDEBUG 353 /* Init debugging stuff */ 352 /* Initialize debugging stuff */ 353 thread->btrace = false; 354 354 udebug_thread_initialize(&thread->udebug); 355 355 #endif … … 752 752 } 753 753 754 #ifdef CONFIG_UDEBUG 755 754 756 void thread_stack_trace(thread_id_t thread_id) 755 757 { … … 794 796 irq_spinlock_unlock(&threads_lock, true); 795 797 } 798 799 #endif /* CONFIG_UDEBUG */ 796 800 797 801 /** Process syscall to create new thread.
Note:
See TracChangeset
for help on using the changeset viewer.