[Bug 1607] __RTEMS_SIZEOF_VOID_P__ flawed design

bugzilla-daemon at rtems.org bugzilla-daemon at rtems.org
Thu Jul 15 05:44:23 UTC 2010


https://www.rtems.org/bugzilla/show_bug.cgi?id=1607

--- Comment #13 from Ralf Corsepius <ralf.corsepius at rtems.org> 2010-07-15 00:44:22 CDT ---
(In reply to comment #12)
> Let me see if I can sum up the primary issues:
> 
> + can't multilib the autoconf output so the use of generated sizeof can't
>   go in cpukit
Wrong.

You MUST NOT put your ___RTEMS_SIZEOF_VOID_P__ into an installed headers.

This is only tangentially related to autoconf, but actually is a design flaw of
your works.

> + rewriting ISR code in C would be a lengthy undertaking, likely breaking
>   code that is very carefully written.

Wrong again. Converting it into inline-asm is a mechanical task.

> + using a new variable with sizeof(void *) in it will require modifications
>   to the ISR code (which itself is OK) but the additions will add execution
>   time to the most critical part of the system.
Right, it voids what I consider to be an overzealous micro optimization.

> The ISR code is already split between cpukit, libcpu, and libbsp.  SMP
> support will require it to be outside the cpukit.  
Correct, unless the implementation's design is not being changed essentially.



> If we move the ISR code outside cpukit, then how would you prefer the
> offsets be generated?

Me thinks you still have not understood the issue:

- autoconf detected values are configure-time detected constants.
- They are valid only for the CFLAGS having been used at configure-time

=> They are WRONG and INVALID for all other compiler setups (CFLAGS,
multilibs).

=> The autoconf detected constants may only be used inside of the build-tree
and must not be explictily exported from the build-tree (== it is wrong to
install them).

i.e. there is nothing wrong in using autoconf's SIZEOF_VOIDP during
compilation, except that you must not export the results in headers.

Unfortunately your code is not designed in a way making this easy.

-- 
Configure bugmail: https://www.rtems.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the bugs mailing list