diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2013-02-08 00:17:54 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2013-02-08 00:17:54 +0000 |
commit | 0017d65ee25f15e67e5376ac59340e5835032867 (patch) | |
tree | 24ad7c1d7f8d998510e9c25e2cfb12e012506b5f /apps/nshlib | |
parent | 6513234d7d98c48ee6ffdd56e19f3e987eb753fb (diff) | |
download | nuttx-0017d65ee25f15e67e5376ac59340e5835032867.tar.gz nuttx-0017d65ee25f15e67e5376ac59340e5835032867.tar.bz2 nuttx-0017d65ee25f15e67e5376ac59340e5835032867.zip |
LPC17xx now supports FPU needed by LPC1788; LPC17xx can not use Mike's common vectors
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5623 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'apps/nshlib')
-rw-r--r-- | apps/nshlib/nsh_proccmds.c | 37 |
1 files changed, 28 insertions, 9 deletions
diff --git a/apps/nshlib/nsh_proccmds.c b/apps/nshlib/nsh_proccmds.c index 3f206b592..29daec0cd 100644 --- a/apps/nshlib/nsh_proccmds.c +++ b/apps/nshlib/nsh_proccmds.c @@ -129,23 +129,42 @@ static void ps_task(FAR struct tcb_s *tcb, FAR void *arg) /* Show task name and arguments */ - nsh_output(vtbl, "%s(", tcb->argv[0]); +#if CONFIG_TASK_NAME_SIZE > 0 + nsh_output(vtbl, "%s(", tcb->name); +#else + nsh_output(vtbl, "<noname>("); +#endif - /* Special case 1st argument (no comma) */ + /* Is this a task or a pthread? */ - if (tcb->argv[1]) +#ifndef CONFIG_DISABLE_PTHREAD + if ((tcb->flags & TCB_FLAG_TTYPE_MASK) == TCB_FLAG_TTYPE_PTHREAD) { - nsh_output(vtbl, "%p", tcb->argv[1]); + FAR struct pthread_tcb_s *ptcb = (FAR struct pthread_tcb_s *)tcb; + nsh_output(vtbl, "%p", ptcb->arg); } + else +#endif + { + FAR struct task_tcb_s *ttcb = (FAR struct task_tcb_s *)tcb; + + /* Special case 1st argument (no comma) */ - /* Then any additional arguments */ + if (ttcb->argv[1]) + { + nsh_output(vtbl, "%p", ttcb->argv[1]); + } + + /* Then any additional arguments */ #if CONFIG_MAX_TASK_ARGS > 2 - for (i = 2; i <= CONFIG_MAX_TASK_ARGS && tcb->argv[i]; i++) - { - nsh_output(vtbl, ", %p", tcb->argv[i]); - } + for (i = 2; i <= CONFIG_MAX_TASK_ARGS && ttcb->argv[i]; i++) + { + nsh_output(vtbl, ", %p", ttcb->argv[i]); + } #endif + } + nsh_output(vtbl, ")\n"); } #endif |