[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v5] new config option vtsc_tolerance_khz to avoid TSC emulation



>>> On 29.03.18 at 11:23, <olaf@xxxxxxxxx> wrote:
> On Thu, Mar 29, Jan Beulich wrote:
> 
>> When you use abs() or alike in places like this, it is more immediately
>> obvious to the reader what you're doing.
> 
> Does every supported compiler actually understand this?
> int khz_diff = __builtin_abs(cpu_khz - gtsc_khz);
> Or do we need an inline abs() in case it is not gcc?

Actually I was wrong - we have an abstraction already, just that
it's upper case: ABS(). But it requires its input to have signed type.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.