From 01fd5bd011aed066454f8ce010d521004cd4fe80 Mon Sep 17 00:00:00 2001 From: jjenista Date: Fri, 24 Jul 2009 22:55:55 +0000 Subject: [PATCH] changes --- Robust/src/IR/Flat/BuildCode.java | 14 ++++++-------- Robust/src/Runtime/workschedule.c | 3 ++- Robust/src/Tests/mlp/tinyTest/test.java | 3 ++- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Robust/src/IR/Flat/BuildCode.java b/Robust/src/IR/Flat/BuildCode.java index 2c485dcc..7ccde198 100644 --- a/Robust/src/IR/Flat/BuildCode.java +++ b/Robust/src/IR/Flat/BuildCode.java @@ -1734,14 +1734,13 @@ public class BuildCode { PrintWriter outputMethHead, PrintWriter outputMethods ) { - - /* + FlatMethod fm = fsen.getEnclosingFlatMeth(); MethodDescriptor md = fm.getMethod(); ClassDescriptor cn = md.getClassDesc(); - //Creates bogus method descriptor to index into tables + // Creates bogus method descriptor to index into tables Modifiers bogusmod=new Modifiers(); MethodDescriptor bogusmd=new MethodDescriptor(bogusmod, new TypeDescriptor(TypeDescriptor.VOID), @@ -1751,7 +1750,7 @@ public class BuildCode { sese2bogusFlatMeth.put(fsen, bogusfm); - //Build paramsobj for bogus method descriptor + // Build paramsobj for bogus method descriptor ParamsObject objectparams=new ParamsObject(bogusmd, tag++); paramstable.put(bogusmd, objectparams); @@ -1766,7 +1765,7 @@ public class BuildCode { } - //Build normal temp object for bogus method descriptor + // Build normal temp object for bogus method descriptor TempObject objecttemps=new TempObject(objectparams,bogusmd,tag++); tempstable.put(bogusmd, objecttemps); @@ -1786,10 +1785,10 @@ public class BuildCode { // declare namespace struct outputStructs.println(fsen.namespaceStructDeclarationString()); - //Generate code for parameters structure + // Generate code for parameters structure generateMethodParam(cn, bogusmd, null, outputStructs); - //Generate code for locals structure + // Generate code for locals structure outputStructs.println("struct "+cn.getSafeSymbol()+bogusmd.getSafeSymbol()+"_"+bogusmd.getSafeMethodDescriptor()+"_locals {"); outputStructs.println(" INTPTR size;"); outputStructs.println(" void * next;"); @@ -1829,7 +1828,6 @@ public class BuildCode { generateFlatMethodSESE(bogusfm, cn, fsen, fsen.getFlatExit(), outputMethods); - */ } private void generateFlatMethodSESE(FlatMethod fm, diff --git a/Robust/src/Runtime/workschedule.c b/Robust/src/Runtime/workschedule.c index b1e2331d..0f9e49bb 100644 --- a/Robust/src/Runtime/workschedule.c +++ b/Robust/src/Runtime/workschedule.c @@ -86,7 +86,8 @@ void* workerMain( void* arg ) { if( isEmpty( workerDataArray[j].dequeWorkUnits ) ) { pthread_mutex_unlock( &(workerDataArray[j].dequeLock) ); - // no work here, keep looking + // no work here, yield and then keep looking + if( sched_yield() == -1 ) { printf( "Error thread trying to yield.\n" ); exit( -1 ); } continue; } diff --git a/Robust/src/Tests/mlp/tinyTest/test.java b/Robust/src/Tests/mlp/tinyTest/test.java index 027923b3..c64bc3bd 100644 --- a/Robust/src/Tests/mlp/tinyTest/test.java +++ b/Robust/src/Tests/mlp/tinyTest/test.java @@ -44,9 +44,10 @@ public class Test { System.out.println( "x="+x+", y="+y ); //} + /* float xyz = 2.0f; float jjj = Math.abs( xyz ); - + */ //Integer i; -- 2.34.1