Ignore:
Timestamp:
Nov 18, 2019, 11:11:24 AM (2 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
arm-eh, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr
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/concurrency/kernel_private.hfa

    r6559a9d r21184e3  
    101101#define KERNEL_STORAGE(T,X) static char storage_##X[sizeof(T)]
    102102
     103static inline uint32_t tls_rand() {
     104        kernelTLS.rand_seed ^= kernelTLS.rand_seed << 6;
     105        kernelTLS.rand_seed ^= kernelTLS.rand_seed >> 21;
     106        kernelTLS.rand_seed ^= kernelTLS.rand_seed << 7;
     107        return kernelTLS.rand_seed;
     108}
     109
    103110
    104111void doregister( struct cluster & cltr );
Note: See TracChangeset for help on using the changeset viewer.