Patches for classic affinity implementation and test
Joel Sherrill
joel.sherrill at OARcorp.com
Thu Feb 20 22:54:02 UTC 2014
On 2/20/2014 4:45 PM, Peter Dufault wrote:
> On Feb 20, 2014, at 16:11 , Gedare Bloom <gedare at rtems.org> wrote:
>
>> +#if __RTEMS_HAVE_SYS_CPUSET_H__
>> I think we decided to prefer the more explicit "#if defined(...)" for
>> checking for CPP defines.
>> Also, what is this define checking against / where is it defined?
> I think "#if defined()" isn't more explicit unless the test is "#if defined(__RTEMS_HAVE_SYS_CPUSET_H_DEFINED__)" because of the possibility of:
>
> #define __RTEMS_HAVE_SYS_CPUSET_H__ 0
>
> I just hit this the other day. I personally don't like #ifdef.
>
> "#if defined(__RTEMS_HAVE_SYS_CPUSET_H__) && (__RTEMS_HAVE_SYS_CPUSET_H__ != 0)" addresses all possibilities and is kind of like wrapping macros in "do .. while (0)" guards, but it's verbose and odd.
I have nothing against paranoia but this is unfortunately a pattern
encouraged
by autoconf feature macros. If we can come to some agreement on the pattern,
then it should be possible to write a script to convert from old to new
pattern.
But arbitrarily using a different pattern in new code isn't good either.
I would
rather see a massive sed script to fix them all in one sweep.
> Peter
> -----------------
> Peter Dufault
> HD Associates, Inc. Software and System Engineering
>
>
> _______________________________________________
> rtems-devel mailing list
> rtems-devel at rtems.org
> http://www.rtems.org/mailman/listinfo/rtems-devel
--
Joel Sherrill, Ph.D. Director of Research & Development
joel.sherrill at OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985
More information about the devel
mailing list