Parcourir la source

Make the acces chanel urgent

And add them to counter testing transition.

The purpose is to prevent the starvation.

But it does not seem to work.
DricomDragon il y a 5 ans
Parent
commit
1da94bc9eb
1 fichiers modifiés avec 7 ajouts et 2 suppressions
  1. 7 2
      ds/trains0.xml

+ 7 - 2
ds/trains0.xml

@@ -15,7 +15,8 @@ typedef int[0,NBA-1] id_tBA;
 
 int ab=0, ba=0;
 
-chan        accesAB[NAB], accesBA[NBA], libAB[NAB], libBA[NBA], requestAB[NAB], requestBA[NBA];
+chan        libAB[NAB], libBA[NBA], requestAB[NAB], requestBA[NBA];
+urgent chan accesAB[NAB], accesBA[NBA];
 
 </declaration>
 	<template>
@@ -188,7 +189,9 @@ some other trains are waiting on B.</label>
 		<transition>
 			<source ref="id12"/>
 			<target ref="id9"/>
+			<label kind="select" x="-221" y="153">e:id_tAB</label>
 			<label kind="guard" x="-221" y="136">ba == 0</label>
+			<label kind="synchronisation" x="-246" y="170">accesAB[e] !</label>
 			<nail x="-153" y="144"/>
 		</transition>
 		<transition>
@@ -233,7 +236,9 @@ some other trains are waiting on B.</label>
 		<transition>
 			<source ref="id11"/>
 			<target ref="id10"/>
-			<label kind="guard" x="-221" y="42">ab == 0</label>
+			<label kind="select" x="-221" y="17">e:id_tBA</label>
+			<label kind="guard" x="-221" y="0">ab == 0</label>
+			<label kind="synchronisation" x="-246" y="34">accesBA[e] !</label>
 			<nail x="-153" y="50"/>
 		</transition>
 		<transition>