MINOR: threads: add a "stuck" flag to the thread_info struct

This flag is constantly cleared by the scheduler and will be set by the
watchdog timer to detect stuck threads. It is also set by the "show
threads" command so that it is easy to spot if the situation has evolved
between two subsequent calls : if the first "show threads" shows no stuck
thread and the second one shows such a stuck thread, it indicates that
this thread didn't manage to make any forward progress since the previous
call, which is extremely suspicious.
diff --git a/include/common/hathreads.h b/include/common/hathreads.h
index 77bd617..3209909 100644
--- a/include/common/hathreads.h
+++ b/include/common/hathreads.h
@@ -38,6 +38,10 @@
  *      only one thread is enabled, it equals 1.
  */
 
+/* thread info flags, for thread_info[].flags */
+#define TI_FL_STUCK             0x00000001
+
+
 #ifndef USE_THREAD
 
 #define MAX_THREADS 1
@@ -57,6 +61,7 @@
 	uint64_t prev_cpu_time;    /* previous per thread CPU time */
 	uint64_t prev_mono_time;   /* previous system wide monotonic time  */
 	unsigned int idle_pct;     /* idle to total ratio over last sample (percent) */
+	unsigned int flags;        /* thread info flags, TI_FL_* */
 	/* pad to cache line (64B) */
 	char __pad[0];            /* unused except to check remaining room */
 	char __end[0] __attribute__((aligned(64)));
@@ -405,6 +410,7 @@
 	uint64_t prev_cpu_time;    /* previous per thread CPU time */
 	uint64_t prev_mono_time;   /* previous system wide monotonic time  */
 	unsigned int idle_pct;     /* idle to total ratio over last sample (percent) */
+	unsigned int flags;        /* thread info flags, TI_FL_* */
 	/* pad to cache line (64B) */
 	char __pad[0];            /* unused except to check remaining room */
 	char __end[0] __attribute__((aligned(64)));