[PATCH v2] rtems: Add rtems_task_create_from_config()

Sebastian Huber sebastian.huber at embedded-brains.de
Wed Sep 9 08:21:49 UTC 2020

On 09/09/2020 10:07, Chris Johns wrote:
> On 9/9/20 4:49 pm, Sebastian Huber wrote:
>> On 09/09/2020 07:56, Chris Johns wrote:
>>> What about a test for this API that has a 100K char TLS array and all the other
>>> task values as defaults? If the space allocated and reported in the link map is
>>> not just over 100K there is a problem.
>> As I said before, this API is for users which want to do the memory allocation
>> on their own. These users must know when they have an 100K char TLS array in
>> their application. They just have to use in this case:
>> #define MY_TLS (100K + whatever)
> Ouch. This is not very nice. I see your design problem with this API.

I need an API which allows the user to provide the task storage area. 
The user should be able to use statically allocated memory for this.

The task storage area contains the task stack, the thread-local storage, 
and the floating-point context on architectures with a separate 
floating-point context.

The TLS size is known at link-time. If a user wants to use a statically 
allocated memory area for the task storage area, then the size of the 
user-provided task storage area must be known at compile-time.

 From my point of view all what we can do is a sanity check at run-time. 
Do you have a better approach?

> I will try and discuss this topic with Joel tomorrow if we can get together.

Ok, thanks for having a look at it.

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 embedded-brains.de
PGP     : Public key available on request.

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

More information about the devel mailing list