Per-BSP confdefs (or resource allocation)

Chris Johns chrisj at
Sat Oct 24 00:12:29 UTC 2015

On 22/10/2015 6:16 pm, Sebastian Huber wrote:
> On 22/10/15 09:00, Chris Johns wrote:
>> In the mean time could linker sets be used in drivers or BSPs to declare
>> a table of "resources" they need and these are added to the confdefs.h
>> defined values during initialisation?
> Yes, this would probably work. You should however compare the complexity of
> 1) linker sets
>     + dynamic workspace size changes
>     + static pre-processor based workspace size estimate (just look at
> the pre-processed output of confdefs.h)
>     + workspace (heap)
>     + objects
>     + side-effects, e.g. subsystem which doesn't account for its resources
>     + initialization order
>     + run-time initialization errors
> vs.
> 2) provide some storage (16 bytes for a mutex on a 32-bit target)
>     + initialize the object (= initialize storage to zero, no possible
> errors, may reside in .bss)

There is no argument from me about the API being simpler and faster as
the libbsd work has shown but I am concerned about linking this specific
issue being discussed to a long term solution that is not even fully
agreed to. If this API does get implemented we will always want to have
both APIs and I am not sure we will want to migrate all BSPs so does
this mean we need another solution.

Do we leave this issue alone until your proposed API is available or do
we look for a solution with the current API we can implement now and
bridge that gap?


More information about the devel mailing list