Changeset 12b5e94a for libcfa/src/concurrency/thread.hfa
- Timestamp:
- Feb 9, 2022, 10:59:05 PM (3 years ago)
- Branches:
- ADT, ast-experimental, enum, forall-pointer-decay, master, pthread-emulation, qualifiedEnum
- Children:
- 454b4e0
- Parents:
- 7a15b7e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/thread.hfa
r7a15b7e r12b5e94a 10 10 // Created On : Tue Jan 17 12:27:26 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Jan 6 16:40:16202213 // Update Count : 712 // Last Modified On : Wed Feb 9 22:10:14 2022 13 // Update Count : 14 14 14 // 15 15 … … 130 130 T & join( T & this ); 131 131 132 //---------- 133 static inline { 134 uint32_t prng( thread$ & th ) __attribute__(( warn_unused_result )) { return LCG( th.random_state ); } // [0,UINT_MAX] 135 uint32_t prng( thread$ & th, uint32_t u ) __attribute__(( warn_unused_result )) { return prng( th ) % u; } // [0,u) 136 uint32_t prng( thread$ & th, uint32_t l, uint32_t u ) __attribute__(( warn_unused_result )) { return prng( th, u - l + 1 ) + l; } // [l,u] 137 } // prng 138 132 139 // Local Variables: // 133 140 // mode: c //
Note: See TracChangeset
for help on using the changeset viewer.