Commit ce6baf91 authored by stancakapost's avatar stancakapost
Browse files

added add component.done to avoid racing condition between mtc

termination and ptc termination

also changed the behavior so that it is actually dependent on components
having different seeds. The way it was before, it would also have worked
if the components used the same seed, as only the rnd(seed) - function,
which does not use the internal seed (just updates it), was used.
parent 1bdd1cd0
......@@ -8,7 +8,7 @@
/* The following requirements are tested:
* check that rnd() uses seeds per component
* */
module Sem_160102_predefined_functions_091 {
......@@ -19,8 +19,9 @@ module Sem_160102_predefined_functions_091 {
//function to generate random number with seed given as input
function frnd(float seed) runs on GeneralComp {
var float v_random1 := rnd(seed);
var float v_random2 := rnd();
if(match(rnd(seed),v_random1) and not match(rnd(1.0), v_random1) ) {
if(match(v_random2, rnd(v_random1)) and not match(seed, v_random1) ) {
} else {
......@@ -40,6 +41,7 @@ module Sem_160102_predefined_functions_091 {
//different seeds given to components:
all component.done;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment