[Bug 1607] __RTEMS_SIZEOF_VOID_P__ flawed design

bugzilla-daemon at rtems.org bugzilla-daemon at rtems.org
Wed Jul 7 14:57:19 UTC 2010


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

--- Comment #2 from Ralf Corsepius <ralf.corsepius at rtems.org> 2010-07-07 09:57:15 CDT ---
(In reply to comment #1)
> (In reply to comment #0)
> > This change is a massive design flaw:
> > 
> > > 2010-06-29 Joel Sherrill <joel.sherrill at oarcorp.com>
> > > 
> > > * configure.ac, score/include/rtems/score/percpu.h: Add
> > > __RTEMS_SIZEOF_VOID_P__ to cpuopts.h so percpu.h has this information
> > > available during build and after installation.
> > 
> > Sizes are compile time constants and therefore may depend upon compiler 
> > flags (e.g. multilibs) flags. Defining them in a globally exported 
> > header being shared by different architecture variants qualifies is absurd.
> > 
> > Proposal: Joel to revert his whole __RTEMS_SIZEOF_VOID_P__ patch-set.
> 
> Maybe we should add this define to a no-installation header file?
Right. #1 candidate would be config.h.

Unfortunately Joel has added further defines (in percpu.h) using
__RTEMS_SIZEOF_VOID_P__ which make tracking use case of this define very hard.

I.e. an alternative to reverting Joel's stuff would be to extract all defines
which are using __RTEMS_SIZEOF_VOID_P__ to a private per-BSP header and to
remove all use case from cpukit (Unfortunately, this doesn't seem to easily 
achievable).


> Btw. is SIZEOF_CPU_CONTEXT also something suspicious in cpuopts.h?
Suspicious, yet. Whether it actually is depends. 
ATM, without having looked into the source-tree, I am a bit surprised it is
still around (I thought it was gone).

-- 
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