Index: libcfa/src/concurrency/kernel/startup.cfa
===================================================================
--- libcfa/src/concurrency/kernel/startup.cfa	(revision c52f0330d68ead6e49d819136e6238c096f77c10)
+++ libcfa/src/concurrency/kernel/startup.cfa	(revision 1959528943f80644f53138c6bb1c3c33883c8ceb)
@@ -101,4 +101,5 @@
 extern void __wake_proc(processor *);
 extern int cfa_main_returned;							// from interpose.cfa
+extern uint32_t __global_random_seed;
 
 //-----------------------------------------------------------------------------
@@ -489,4 +490,5 @@
 	preferred = ready_queue_new_preferred();
 	last_proc = 0p;
+	random_state = __global_random_seed;
 	#if defined( __CFA_WITH_VERIFY__ )
 		canary = 0x0D15EA5E0D15EA5Ep;
Index: libcfa/src/concurrency/thread.cfa
===================================================================
--- libcfa/src/concurrency/thread.cfa	(revision c52f0330d68ead6e49d819136e6238c096f77c10)
+++ libcfa/src/concurrency/thread.cfa	(revision 1959528943f80644f53138c6bb1c3c33883c8ceb)
@@ -10,6 +10,6 @@
 // Created On       : Tue Jan 17 12:27:26 2017
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Mon Jan 10 17:05:35 2022
-// Update Count     : 28
+// Last Modified On : Wed Jan 12 18:28:18 2022
+// Update Count     : 35
 //
 
@@ -27,5 +27,5 @@
 uint64_t thread_rand();
 
-extern uint32_t __thread_seed;							// global thread seed
+extern uint32_t __global_random_seed;
 
 //-----------------------------------------------------------------------------
@@ -41,5 +41,4 @@
 	self_mon.owner = &this;
 	self_mon.recursion = 1;
-	random_state = __thread_seed;
 	self_mon_p = &self_mon;
 	curr_cluster = &cl;
@@ -48,4 +47,5 @@
 	preferred = ready_queue_new_preferred();
 	last_proc = 0p;
+	random_state = __global_random_seed;
 	#if defined( __CFA_WITH_VERIFY__ )
 		canary = 0x0D15EA5E0D15EA5Ep;
@@ -180,19 +180,22 @@
 	return ret;
 }
-
+ 
 #define GENERATOR LCG
 
-inline uint32_t MarsagliaXor( uint32_t & state ) {
+static inline uint32_t MarsagliaXor( uint32_t & state ) {
+	uint32_t ret = state;
 	state ^= state << 6;
 	state ^= state >> 21;
 	state ^= state << 7;
-	return state;
+	return ret;
 } // MarsagliaXor
 
-inline uint32_t LCG( uint32_t & state ) {				// linear congruential generator
-	return state = 36969 * (state & 65535) + (state >> 16); // 36969 is NOT prime!
+static inline uint32_t LCG( uint32_t & state ) {		// linear congruential generator
+	uint32_t ret = state;
+	state = 36969 * (state & 65535) + (state >> 16);	// 36969 is NOT prime! No not change it!
+	return ret;
 } // LCG
 
-void set_seed( uint32_t seed ) { active_thread()->random_state = seed; __thread_seed = seed; }
+void set_seed( uint32_t seed ) { active_thread()->random_state = seed; __global_random_seed = seed; }
 uint32_t prng( void ) { return GENERATOR( active_thread()->random_state ); } // [0,UINT_MAX]
 
