> > > > @@ -143,7 +143,7 @@ DT_Mdep_GetTimeStamp ( void )
> > > > asm volatile("rdtsc" : "=a" (__a), "=d" (__d));
> > > > return ((unsigned long)__a) | (((unsigned long)__d)<<32);
> > > > #else
> > > > -#error "Non-Pentium and Non-PPC Linux - unimplemented"
> > > > +#error "Linux CPU architecture - unimplemented"
> > > > #endif
> > > > #endif
> > > > #endif
> >
> > You can't detect a pentium processor at compile-time, and testing
> > for __PENTIUM__ is the wrong thing to do - you are actually testing
> > for pentium-only optimizations being enabled in compiler.
> >
> > You really must test for processor type at run time.
>
> How do you suggest performing the run time check?
>
> Parse /proc/cpuinfo for the "tsc" string in the flags field, use
> assembly programming to check the eflags & issue a CPUID
> instruction,...?
>
> We'd like something easy to maintain.
I think either if these methods will do.
Assembly will probably be shorter and have less chances to break with kernel
changes.
--
MST
_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general
To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general