Changeset 21184e3 for libcfa/src/bits


Ignore:
Timestamp:
Nov 18, 2019, 11:11:24 AM (5 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
57c764c, 7768b8d
Parents:
6559a9d
Message:

Added Thread-Local random number generator to kernel which will be needed for the ready-queue

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/bits/defs.hfa

    r6559a9d r21184e3  
    4747#define OPTIONAL_THREAD __attribute__((weak))
    4848#endif
     49
     50static inline long long rdtscl(void) {
     51    unsigned int lo, hi;
     52    __asm__ __volatile__ ("rdtsc" : "=a"(lo), "=d"(hi));
     53    return ( (unsigned long long)lo)|( ((unsigned long long)hi)<<32 );
     54}
Note: See TracChangeset for help on using the changeset viewer.