Преглед на файлове

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 преди 5 години
родител
ревизия
8c98d7edb8
променени са 1 файла, в които са добавени 7 реда и са изтрити 2 реда
  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>