Closed akloeckner closed 9 years ago
Looks good to me.
Sorry, missed one. In ModelicaRandom_impureRandom_xorshift1024star MUTEX_LOCK must be called before ModelicaRandom_id is accessed.
MUTEX_LOCK();
/* Check that ModelicaRandom_initializeImpureRandome_xorshift1024star was called before */
if ( id != ModelicaRandom_id ) {
ModelicaError("Function impureRandom not initialized with function initializeImpureRandom");
}
/* Compute random number */
ModelicaRandom_xorshift1024star_internal(ModelicaRandom_s, &ModelicaRandom_p, &y);
MUTEX_UNLOCK();
return y;
This adresses the issue #45.