- File:
-
- 1 edited
-
libcfa/src/concurrency/kernel/startup.cfa (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/kernel/startup.cfa
r639e4fc rdd46fd3 39 39 #include "limits.hfa" 40 40 #include "math.hfa" 41 #include "bits/random.hfa" // prng 41 42 42 43 #define CFA_PROCESSOR_USE_MMAP 0 … … 107 108 extern void __wake_proc(processor *); 108 109 extern int cfa_main_returned; // from interpose.cfa 109 uint32_t __global_random_prime = 4_294_967_291u, __global_random_mask = false; 110 size_t __global_random_prime = 4_294_967_291u; 111 bool __global_random_mask = false; 110 112 111 113 //----------------------------------------------------------------------------- … … 133 135 // Global state 134 136 __thread struct KernelThreadData __cfaabi_tls __attribute__ ((tls_model ( "initial-exec" ))) @= { 135 NULL,// cannot use 0p136 NULL,137 false,138 { 1, false,false },139 0,140 { 0,0 },141 NULL,137 .this_thread : NULL, // cannot use 0p 138 .this_processor : NULL, 139 .sched_lock : false, 140 .preemption_state : { .disable_count : 1, .enabled : false, .in_progress : false }, 141 // random_state uninitialized 142 .ready_rng : { .fwd_seed : 0, .bck_seed : 0 }, 143 .this_stats : NULL, 142 144 #ifdef __CFA_WITH_VERIFY__ 143 false,144 0,145 .in_sched_lock : false, 146 .sched_id : 0, 145 147 #endif 146 148 }; … … 513 515 rdy_link.next = 0p; 514 516 rdy_link.ts = MAX; 517 user_link.next = 0p; 518 user_link.prev = 0p; 519 cltr_link.next = 0p; 520 cltr_link.prev = 0p; 515 521 preferred = ready_queue_new_preferred(); 516 522 last_proc = 0p; 517 random_state = __global_random_mask ? __global_random_prime : __global_random_prime ^ rdtscl();523 PRNG_SET_SEED( random_state, __global_random_mask ? __global_random_prime : __global_random_prime ^ rdtscl() ); 518 524 #if defined( __CFA_WITH_VERIFY__ ) 519 525 executing = 0p;
Note:
See TracChangeset
for help on using the changeset viewer.