- File:
-
- 1 edited
-
libcfa/src/concurrency/kernel/fwd.hfa (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/kernel/fwd.hfa
rdd46fd3 r3fcb5921 46 46 } preemption_state; 47 47 48 PRNG_STATE_T random_state; 49 48 #if defined(__SIZEOF_INT128__) 49 __uint128_t rand_seed; 50 #else 51 uint64_t rand_seed; 52 #endif 50 53 struct { 51 54 uint64_t fwd_seed; … … 54 57 55 58 struct __stats_t * volatile this_stats; 59 56 60 57 61 #ifdef __CFA_WITH_VERIFY__ … … 72 76 #define publicTLS_get( member ) ((typeof(__cfaabi_tls.member))__cfatls_get( __builtin_offsetof(KernelThreadData, member) )) 73 77 74 static inline 75 #ifdef __x86_64__ // 64-bit architecture 76 uint64_t 77 #else // 32-bit architecture 78 uint32_t 79 #endif // __x86_64__ 80 __tls_rand() { 81 return PRNG_NAME( kernelTLS().random_state ); 78 static inline uint64_t __tls_rand() { 79 return 80 #if defined(__SIZEOF_INT128__) 81 lehmer64( kernelTLS().rand_seed ); 82 #else 83 xorshift_13_7_17( kernelTLS().rand_seed ); 84 #endif 82 85 } 83 86 … … 117 120 118 121 // Yield: yield N times 119 static inline void yield( size_ttimes ) {122 static inline void yield( unsigned times ) { 120 123 for( times ) { 121 124 yield();
Note:
See TracChangeset
for help on using the changeset viewer.