Thanks guys. Submitted revised patch series which checks for Linux, uses
fewer preprocessor conditions, and deals with some of the resulting unit
test fallout.

~Leo

On Wed, Aug 8, 2012 at 12:24 PM, Ben Pfaff <b...@nicira.com> wrote:

> On Tue, Aug 07, 2012 at 05:00:59PM -0700, Leo Alterman wrote:
> > 64-bit glibc appears to avoid syscalls for clock_gettime(), so we can get
> > higher resolution timing and avoid having a timer firing off SIGALRM
> > without introducing extra overhead.
> >
> > Signed-off-by: Leo Alterman <lalter...@nicira.com>
>
> I agree with Ed Maste that this should be limited to Linux on x86-64
> (not ia64 == Itanium).
>
> Preprocessor directives should be at the left margin, not indented to
> the same level as the code.  However, after looking at it, I think
> that we shouldn't be using preprocessor directives.  Instead, do
> something like vswitchd/system-stats.c, which has:
>
> /* #ifdefs make it a pain to maintain code: you have to try to build both
> ways.
>  * Thus, this file tries to compile as much of the code as possible
> regardless
>  * of the target, by writing "if (LINUX)" instead of "#ifdef __linux__"
> where
>  * this is possible. */
> #ifdef __linux__
> #include <asm/param.h>
> #define LINUX 1
> #else
> #define LINUX 0
> #endif
>
> and then uses "if" instead of "#ifdef" wherever it can.
>
> Does it pass the unit tests?
>
> Thanks,
>
> Ben.
>
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to