summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rwxr-xr-xapps/examples/thttpd/content/tasks/tasks.c12
-rw-r--r--apps/nshlib/nsh_proccmds.c10
2 files changed, 19 insertions, 3 deletions
diff --git a/apps/examples/thttpd/content/tasks/tasks.c b/apps/examples/thttpd/content/tasks/tasks.c
index 13ba5cbb6..780569090 100755
--- a/apps/examples/thttpd/content/tasks/tasks.c
+++ b/apps/examples/thttpd/content/tasks/tasks.c
@@ -1,7 +1,7 @@
/****************************************************************************
* examples/thttpd/tasks/tasks.c
*
- * Copyright (C) 2009 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -77,6 +77,14 @@ static const char *g_statenames[] =
#endif
};
+static const char *g_ttypenames[4] =
+{
+ "TASK ",
+ "PTHREAD",
+ "KTHREAD",
+ "--?-- "
+};
+
/****************************************************************************
* Public Data
****************************************************************************/
@@ -104,7 +112,7 @@ static const char *g_statenames[] =
printf("%5d %3d %4s %7s%c%c %8s ",
tcb->pid, tcb->sched_priority,
tcb->flags & TCB_FLAG_ROUND_ROBIN ? "RR " : "FIFO",
- tcb->flags & TCB_FLAG_PTHREAD ? "PTHREAD" : "TASK ",
+ g_ttypenames[(tcb->flags & TCB_FLAG_TTYPE_MASK) >> TCB_FLAG_TTYPE_SHIFT],
tcb->flags & TCB_FLAG_NONCANCELABLE ? 'N' : ' ',
tcb->flags & TCB_FLAG_CANCEL_PENDING ? 'P' : ' ',
g_statenames[tcb->task_state]);
diff --git a/apps/nshlib/nsh_proccmds.c b/apps/nshlib/nsh_proccmds.c
index 7abd50ec1..8ae201123 100644
--- a/apps/nshlib/nsh_proccmds.c
+++ b/apps/nshlib/nsh_proccmds.c
@@ -86,6 +86,14 @@ static const char *g_statenames[] =
"MQNFULL "
#endif
};
+
+static const char *g_ttypenames[4] =
+{
+ "TASK ",
+ "PTHREAD",
+ "KTHREAD",
+ "--?-- "
+};
#endif
/****************************************************************************
@@ -111,7 +119,7 @@ static void ps_task(FAR _TCB *tcb, FAR void *arg)
nsh_output(vtbl, "%5d %3d %4s %7s%c%c %8s ",
tcb->pid, tcb->sched_priority,
tcb->flags & TCB_FLAG_ROUND_ROBIN ? "RR " : "FIFO",
- tcb->flags & TCB_FLAG_PTHREAD ? "PTHREAD" : "TASK ",
+ g_ttypenames[(tcb->flags & TCB_FLAG_TTYPE_MASK) >> TCB_FLAG_TTYPE_SHIFT],
tcb->flags & TCB_FLAG_NONCANCELABLE ? 'N' : ' ',
tcb->flags & TCB_FLAG_CANCEL_PENDING ? 'P' : ' ',
g_statenames[tcb->task_state]);