task info

Ian Caddy ianc at goanna.iinet.net.au
Fri Mar 22 00:23:22 UTC 2019


Hi Matthew,

Do you have access to the shell on a serial or telnet console?

The RTEMS shell has a "task" command that shows the state of all the 
tasks running in your system:

MNTB [/] # task
ID       NAME                 SHED PRI STATE  MODES    EVENTS WAITINFO
------------------------------------------------------------------------------
0a010001 USBd                 UPD  200 TIME   P:T:nA   NONE
0a010003 ERRM                 UPD   55 MSG    P:T:nA   NONE 22010003
0a010004 ADLT                 UPD   92 MSG    P:T:nA   NONE 22010006

Based on the wait info, you can work out what it is waiting on using the 
other shell commands, such as:

queue or sema

MNTB [/] # queue
   ID       NAME   ATTRIBUTES   PEND   MAXPEND  MAXSIZE
------------------------------------------------------------------------------
22010001   USBr    DEFAULT        0    3000        1
22010002   USBt    DEFAULT       40    10000       1
22010003   EMIQ    PR             0      15       32

In the example above, the task ERRM is waiting for a message on the 
queue EMIQ.

If you do not have access to the shell, you can try to follow through 
what the shell actually does in the code, and hopefully it will provide 
the information that you are looking for.

regards,

Ian Caddy



On 22/03/2019 3:41 am, Mathew Benson wrote:
> What's the best way to determine the status of a task?  Is there an 
> API to determine if its pending or a runnable state?  Is there an API 
> to determine what its pending on?  I'm trying to determine what some 
> tasks stopped executing and I can't use a debugger.  Preferably, can 
> somebody point me to a symbol that I can peek?
>
> -- 
> *Mathew Benson*
> CEO | Chief Engineer
> Windhover Labs, LLC
> 832-640-4018
>
>
> www.windhoverlabs.com <http://www.windhoverlabs.com>
>
>
> _______________________________________________
> users mailing list
> users at rtems.org
> http://lists.rtems.org/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20190322/f71898d2/attachment-0002.html>


More information about the users mailing list