Ignore:
Timestamp:
Nov 18, 2019, 11:11:24 AM (4 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/concurrency/kernel.cfa

    r6559a9d r21184e3  
    133133        NULL,
    134134        NULL,
    135         { 1, false, false }
     135        { 1, false, false },
     136        6u //this should be seeded better but due to a bug calling rdtsc doesn't work
    136137};
    137138
     
    260261//Main of the processor contexts
    261262void main(processorCtx_t & runner) {
     263        // Because of a bug, we couldn't initialized the seed on construction
     264        // Do it here
     265        kernelTLS.rand_seed ^= rdtsc();
     266
    262267        processor * this = runner.proc;
    263268        verify(this);
Note: See TracChangeset for help on using the changeset viewer.