[RFC][PATCH 2/2] generic hp_timing
Maria Guseva
m.guseva@samsung.com
Fri Jan 15 11:07:00 GMT 2016
This is a second part of patch: generic time implementation.
Please find my comments below:
>> +#if HP_TIMING_AVAIL
>> if (HP_SMALL_TIMING_AVAIL)
>> HP_TIMING_NOW (_dl_cpuclock_offset);
>> +#endif
>we should avoid CPP here imo. if !HP_TIMING_AVAIL, then shouldn't it already be !HP_SMALL_TIMING_AVAIL ? so you don't need the #if here.
We have _dl_cpuclock_offset defined only in case of HP_TIMING_AVAIL. So without CPP check the compilation fails in generic case when HP_TIMING_NOW is still defined.
>also worth noting that we now require __NR_clock_gettime everywhere, so you can assume that rather than "#ifdef __NR_clock_gettime".
Can you please add more details on this? I see there are still checks for "#ifdef __NR_clock_gettime" in other sources (e.g. nptl/pthread_cond_timedwait.c)
Patch is attached.
I've tested both patches on x86_64 and arm, no new regressions.
Regards,
Maria
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Generic-time-implementation.patch
Type: application/octet-stream
Size: 17526 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20160115/97963cfc/attachment.obj>
More information about the Libc-alpha
mailing list