# HG changeset patch # User nastaran # Date 1424886133 28800 # Node ID 87e9c7544a066c2f4bed24692f15e9714d281ae8 # Parent 8de43b2b023fb827f1b6843f84aa6fbfcb49c939 Made getRunnableCG add GlobalSchedulingPoint as an attribute to global choice generators that capture choices from multiple processes. diff -r 8de43b2b023f -r 87e9c7544a06 src/main/gov/nasa/jpf/vm/AllRunnablesSyncPolicy.java --- a/src/main/gov/nasa/jpf/vm/AllRunnablesSyncPolicy.java Fri Feb 13 20:20:15 2015 -0800 +++ b/src/main/gov/nasa/jpf/vm/AllRunnablesSyncPolicy.java Wed Feb 25 09:42:13 2015 -0800 @@ -69,7 +69,8 @@ protected ChoiceGenerator getRunnableCG (String id, ThreadInfo tiCurrent){ - ThreadInfo[] choices = getTimeoutRunnables(tiCurrent.getApplicationContext()); + ApplicationContext appCtx = tiCurrent.getApplicationContext(); + ThreadInfo[] choices = getTimeoutRunnables(appCtx); if (choices.length == 0){ return null; @@ -81,7 +82,13 @@ } } - return new ThreadChoiceFromSet( id, choices, true); + ChoiceGenerator cg = new ThreadChoiceFromSet( id, choices, true); + + if(!vm.getThreadList().hasProcessTimeoutRunnables(appCtx)) { + GlobalSchedulingPoint.setGlobal(cg); + } + + return cg; } protected boolean setNextChoiceGenerator (ChoiceGenerator cg){