User Extensions, TCB Extension area, and TCBs in general

Wu, Mark H. Mark.H.Wu at
Fri May 15 14:46:14 UTC 2015

I understand that you use rtems_extension_create(), but some of that is done "quietly." Specifically, the static extension set is created by configure, and the stack bounds checking is created similarly (if you use the mechanism described in the documentation). How do I get the object identifiers that are created/returned by that configuration/initialization code?

-----Original Message-----
From: Sebastian Huber [mailto:sebastian.huber at] 
Sent: Thursday, May 14, 2015 22:16
To: Wu, Mark H.; users at
Subject: Re: User Extensions, TCB Extension area, and TCBs in general

The rtems_extension_create() returns an object identifier.  You can use 
rtems_object_id_get_index() to get the index into the extension pointer 
array of the TCB.

On 15/05/15 02:24, Wu, Mark H. wrote:
> Now that I've looked into it more, how do you keep from overwriting other extension sets in general? Specifically, I want to enable the stack bounds checking functionality. But that appears to use an extension set. How do I keep the bounds checking extensions as well as my own? Is that possible?
> -----Original Message-----
> Subject: User Extensions, TCB Extension area, and TCBs in general
> I'm evaluating RTEMS for use on a project I'm working on, and have several questions. I'll probably use 4.11, but since the documentation is only available for 4.10, I'll ask regarding the documentation.
> This question concerns user extensions.
> In the C User's Guide, section 22.2.1, it talks about creating a static extension set and dynamic extension sets. The static set is loaded during configuration, as discussed in section 23.9. Since there is no rtems_extensions_create() call used during configuration, is there any way to get the ID of the static extension set? Specifically, if I have a static extension set that has a fatal error detection handler, and want to add a dynamic set that does something else, then how do I get the fatal pointer from the static set? Do I need to make it a global in the application and reference it directly? And do I have to do the same for all of the other function pointers? This doesn't seem very modular.
> In section 22.2.2, it refers to a TCB Extension Area. It references an index into "an array of pointers in the TCB." How is this array created and accessed? There doesn't seem to be any description of how to add this array to the TCB. Or is the intent to use the task variables?
> All of the signatures for the user extensions deal with rtems_tcb pointers. But there appears to be no way to get the TCB pointer for a task directly? I want to do some simple performance monitoring of one or two tasks... the easiest way would be to just see if the TCB pointers match (to see if it was the task I was interested in). Is the right way to check the tcb-> There seems to be no official documentation on the structure of the TCB... is this intentional? It seems to make it harder to do something like this.
> Thanks.
> Mark.
> _______________________________________________
> users mailing list
> users at

Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber at
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.

More information about the users mailing list