01.06.2014 Views

Concurrent Systems II - Bad Request - Trinity College Dublin

Concurrent Systems II - Bad Request - Trinity College Dublin

Concurrent Systems II - Bad Request - Trinity College Dublin

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

unsigned long long clock_cycles()<br />

{<br />

unsigned long long int x;<br />

__asm__ volatile (".byte 0x0f, 0x31" : "=A" (x));<br />

return x;<br />

Problem Tutorial<br />

}<br />

#elif __x86_64__<br />

unsigned long long clock_cycles(void)<br />

{<br />

unsigned hi, lo;<br />

__asm__ __volatile__ ("rdtsc" : "=a"(lo), "=d"(hi));<br />

return ( (unsigned long long)lo)|( ((unsigned long long)hi)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!