[Bug 1607] __RTEMS_SIZEOF_VOID_P__ flawed design

bugzilla-daemon at rtems.org bugzilla-daemon at rtems.org
Mon Jul 19 18:21:11 UTC 2010


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

--- Comment #27 from Gedare <giddyup44 at yahoo.com> 2010-07-19 13:21:10 CDT ---
Created an attachment (id=898)
 --> (https://www.rtems.org/bugzilla/attachment.cgi?id=898)
Patch: proposed fix alternative to using installed headers

I'm not sure this actually is a proper fix or not, I think the macro still ends
up being in some installed headers (having trouble verifying locally). However,
this patch is something of a "shotgun" approach to the problem -- it adds the
AC_CHECK_SIZEOF([void *]) to every configure.ac file in each individual BSP,
each configure.ac, and keeps it in cpukit/configure.ac but removes the install
to cpuopts.

This should only generate the define macro in an intermediate include during
compilation I think.  The reason that I chose to define the macro in all 3 of
the subsystems is because there is assembly-based interrupt handling code in
all 3 areas of RTEMS.  I didn't feel like picking through the ports to figure
out which one will use the percpu macros.

For testing, I compiled on the sparc/sis, sparc64/niagara, and i386/pc386
targets, which have assembly interrupt handling code in cpukit, libcpu, and
libbsp respectively. These three targets made it easy to identify issues with
any particular approach; for example, only adding the check in libbsp causes
the sparc and sparc64 not to build since the define is not available while
compiling cpukit and libcpu.

I do not believe this is a particularly good solution, but it appears to be a
solution. The biggest hassle is that all of the individual targets'
assembly-based ISR code is not consolidated to a single area.

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