Index: kernel/generic/include/proc/thread.h
===================================================================
--- kernel/generic/include/proc/thread.h	(revision 0843f0254484d658f022d606b3d47bf05f76a621)
+++ kernel/generic/include/proc/thread.h	(revision df58e448060bb6d63ea118d30cb9b3b9b8c059bf)
@@ -91,21 +91,23 @@
 	
 	/** Function implementing the thread. */
-	void (* thread_code)(void *);
+	void (*thread_code)(void *);
 	/** Argument passed to thread_code() function. */
 	void *thread_arg;
 	
 	/**
-	 * From here, the stored context is restored when the thread is
-	 * scheduled.
+	 * From here, the stored context is restored
+	 * when the thread is scheduled.
 	 */
 	context_t saved_context;
-	/**
-	 * From here, the stored timeout context is restored when sleep times
-	 * out.
+	
+	/**
+	 * From here, the stored timeout context
+	 * is restored when sleep times out.
 	 */
 	context_t sleep_timeout_context;
-	/**
-	 * From here, the stored interruption context is restored when sleep is
-	 * interrupted.
+	
+	/**
+	 * From here, the stored interruption context
+	 * is restored when sleep is interrupted.
 	 */
 	context_t sleep_interruption_context;
@@ -125,4 +127,5 @@
 	 */
 	bool in_copy_from_uspace;
+	
 	/**
 	 * True if this thread is executing copy_to_uspace().
@@ -136,4 +139,10 @@
 	 */
 	bool interrupted;
+	
+	/**
+	 * If true, the scheduler will print a stack trace
+	 * to the kernel console upon scheduling this thread.
+	 */
+	bool btrace;
 	
 	/** If true, thread_join_timeout() cannot be used on this thread. */
@@ -236,4 +245,5 @@
 extern void thread_update_accounting(bool);
 extern bool thread_exists(thread_t *);
+extern void thread_stack_trace(thread_id_t);
 
 /** Fpu context slab cache. */
