Ignore:
Timestamp:
Jun 23, 2020, 4:42:58 PM (18 months ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
arm-eh, jacob/cs343-translation, master, new-ast, new-ast-unique-expr
Children:
de917da3
Parents:
b232745
Message:
  • Moved snzi and subqueues outside of ready_queue.cfa.
  • Added random.hfa with multiple prng.
  • Minor optimizations to ready-queue
  • Stats now track number of local pops( bias pops )
  • Fixed stats for io
  • Fixed calculaton of nprocessors
  • Fixed IO to work with new ready-queue
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/concurrency/kernel_private.hfa

    rb232745 r13c5e19  
    2222#include "stats.hfa"
    2323
     24#include "bits/random.hfa"
     25
    2426
    2527//-----------------------------------------------------------------------------
     
    8991#define KERNEL_STORAGE(T,X) __attribute((aligned(__alignof__(T)))) static char storage_##X[sizeof(T)]
    9092
    91 static inline uint32_t __tls_rand() {
    92         kernelTLS.rand_seed ^= kernelTLS.rand_seed << 6;
    93         kernelTLS.rand_seed ^= kernelTLS.rand_seed >> 21;
    94         kernelTLS.rand_seed ^= kernelTLS.rand_seed << 7;
    95         return kernelTLS.rand_seed;
     93static inline uint64_t __tls_rand() {
     94        // kernelTLS.rand_seed ^= kernelTLS.rand_seed << 6;
     95        // kernelTLS.rand_seed ^= kernelTLS.rand_seed >> 21;
     96        // kernelTLS.rand_seed ^= kernelTLS.rand_seed << 7;
     97        // return kernelTLS.rand_seed;
     98        return __lehmer64( kernelTLS.rand_seed );
    9699}
    97100
     
    102105void doregister( struct cluster * cltr, struct $thread & thrd );
    103106void unregister( struct cluster * cltr, struct $thread & thrd );
    104 
    105 void doregister( struct cluster * cltr, struct processor * proc );
    106 void unregister( struct cluster * cltr, struct processor * proc );
    107107
    108108//=======================================================================
     
    264264
    265265//-----------------------------------------------------------------------
     266// remove thread from the ready queue of a cluster
     267// returns bool if it wasn't found
     268bool remove_head(struct cluster * cltr, struct $thread * thrd);
     269
     270//-----------------------------------------------------------------------
    266271// Increase the width of the ready queue (number of lanes) by 4
    267272void ready_queue_grow  (struct cluster * cltr);
Note: See TracChangeset for help on using the changeset viewer.