Index: libcfa/src/concurrency/invoke.h
===================================================================
--- libcfa/src/concurrency/invoke.h	(revision 7d0ebd0d86c0a2ccd570dafa35c3f322a749ff2d)
+++ libcfa/src/concurrency/invoke.h	(revision 2210cfc470a11a69ceb41e0f4eca01bee1633f76)
@@ -10,6 +10,6 @@
 // Created On       : Tue Jan 17 12:27:26 2016
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Thu Jan  6 16:37:40 2022
-// Update Count     : 47
+// Last Modified On : Sun Jan  9 19:06:45 2022
+// Update Count     : 48
 //
 
@@ -211,4 +211,6 @@
 		struct processor * last_proc;
 
+		uint32_t random_state;							// fast random numbers
+
 		#if defined( __CFA_WITH_VERIFY__ )
 			void * canary;
Index: libcfa/src/concurrency/thread.cfa
===================================================================
--- libcfa/src/concurrency/thread.cfa	(revision 7d0ebd0d86c0a2ccd570dafa35c3f322a749ff2d)
+++ libcfa/src/concurrency/thread.cfa	(revision 2210cfc470a11a69ceb41e0f4eca01bee1633f76)
@@ -10,6 +10,6 @@
 // Created On       : Tue Jan 17 12:27:26 2017
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Wed Dec  4 09:17:49 2019
-// Update Count     : 9
+// Last Modified On : Mon Jan 10 17:05:35 2022
+// Update Count     : 28
 //
 
@@ -27,7 +27,9 @@
 uint64_t thread_rand();
 
+extern uint32_t __thread_seed;							// global thread seed
+
 //-----------------------------------------------------------------------------
 // Thread ctors and dtors
-void ?{}(thread$ & this, const char * const name, cluster & cl, void * storage, size_t storageSize ) with( this ) {
+void ?{}( thread$ & this, const char * const name, cluster & cl, void * storage, size_t storageSize ) with( this ) {
 	context{ 0p, 0p };
 	self_cor{ name, storage, storageSize };
@@ -39,4 +41,5 @@
 	self_mon.owner = &this;
 	self_mon.recursion = 1;
+	random_state = __thread_seed;
 	self_mon_p = &self_mon;
 	curr_cluster = &cl;
@@ -178,4 +181,20 @@
 }
 
+#define GENERATOR LCG
+
+inline uint32_t MarsagliaXor( uint32_t & state ) {
+	state ^= state << 6;
+	state ^= state >> 21;
+	state ^= state << 7;
+	return state;
+} // MarsagliaXor
+
+inline uint32_t LCG( uint32_t & state ) {				// linear congruential generator
+	return state = 36969 * (state & 65535) + (state >> 16); // 36969 is NOT prime!
+} // LCG
+
+void set_seed( uint32_t seed ) { active_thread()->random_state = seed; __thread_seed = seed; }
+uint32_t prng( void ) { return GENERATOR( active_thread()->random_state ); } // [0,UINT_MAX]
+
 // Local Variables: //
 // mode: c //
