[zeromq-dev] [PATCH] zmq::clock_t : return correct value in rdtsc() on solaris
Steven McCoy
steven.mccoy at miru.hk
Thu Oct 14 15:37:59 CEST 2010
On 14 October 2010 20:24, Martin Pales <m.pales at gmail.com> wrote:
> Hello,
>
> the attached patch ensures that a correct rdtsc value is returned when
> compiled
> with sunstudio 12 compiler.
>
>
I'm running Sun ONE Studio on Linux at it is working fine with the following
which is pretty much the same as 0MQ's clock:
uint32_t lo, hi;
/* We cannot use "=A", since this would use %rax on x86_64 */
asm volatile ("rdtsc" : "=a" (lo), "=d" (hi));
return (pgm_time_t)hi << 32 | lo;
Where pgm_time_t is effectively uint64_t.
--
Steve-o
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20101014/c41310fe/attachment.htm>
More information about the zeromq-dev
mailing list