1 package DEOS; 20 21 import gov.nasa.jpf.jvm.Verify; 22 23 24 27 class DEOSMainThread extends DEOSThread { 28 public DEOSMainThread (Thread t) { 29 super(t); 30 } 31 32 public void run (int tickResult) { 33 DEOS.inc(); 34 35 if (tickResult == Clock.NOTIMECHANGE) { 36 DEOS.println("No interrupts!"); 38 DEOS.println(thread.toString() + " waiting until next period"); 39 DEOSKernel.waitUntilNextPeriodK(thread); } else { 41 if (Verify.randomBool()) { 42 DEOS.println("---Choice 0 of main---"); 44 DEOS.println(thread.toString() + " waiting until next period"); 45 DEOSKernel.waitUntilNextPeriodK(thread); 46 47 } else { 49 DEOS.println("---Choice 1 of main---"); 50 51 52 getInterrupted(tickResult); 54 } 55 } 56 } 57 } | Popular Tags |