Two Coding Problems

Sun Shine pengsens at
Thu Jan 12 03:50:30 UTC 2006

>Sun Shine wrote:
>>   I have two questions here
>>1. How can I get the TCB of a certain task? Is there any directive 
>>such like "rtems_task_get_tcb"?
>Short Answer: No... its a BAD idea.
>Longer Answer:
>Task Control Blocks contain RTEMS **internal** data and you probably
>don't want to touch it!
>The only time a user written "application" is interested in
>the TCB is in the case of a extension.
>A extension provides a hook for doing something when
>RTEMS executive performs certain task related functions.
>What are you trying to do? Why do you think you need to get access
>to a tasks TCB?

I see in the document rtems-online-doc 4.6.5 say that "TCBs are the only 
RTEMS internal data structure that can be accessed by an application via 
user extension routines". I just try to get it.

>>2. I wrote an APP, In Init() I create a new task then start it.The 
>>function of the new task is to create a new task, too.
>>   Now the Init Task is named T0, the task created by T0 is named 
>>T1, and the task created by T1 is named T2.
><code snipped>
>Ian Caddy answered that bit.
>The information in this e-mail is intended for the addressee only.
>Unauthorised use, copying, disclosure or distribution by anyone else
>is prohibited. Please let us know immediately if you receive this
>e-mail in error. Thank you.

与联机的朋友进行交流,请使用 MSN Messenger:  

More information about the users mailing list