From 506c2e3828ad8bf915e27fbc0e55b614684b4243 Mon Sep 17 00:00:00 2001 From: bdemsky Date: Fri, 16 Feb 2007 05:53:33 +0000 Subject: [PATCH] bugs in my locking discipline --- Robust/src/IR/Flat/BuildCode.java | 16 ++++++++++++++-- Robust/src/Runtime/garbage.c | 3 +++ Robust/src/Runtime/thread.c | 3 +++ 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/Robust/src/IR/Flat/BuildCode.java b/Robust/src/IR/Flat/BuildCode.java index fc5d90ea..20f0892c 100644 --- a/Robust/src/IR/Flat/BuildCode.java +++ b/Robust/src/IR/Flat/BuildCode.java @@ -175,6 +175,8 @@ public class BuildCode { outmethod.println("#include \"methodheaders.h\""); outmethod.println("#include \"virtualtable.h\""); outmethod.println("#include "); + if (state.THREAD) + outmethod.println("#include "); if (state.main!=null) { outmethod.println("#include "); } @@ -249,6 +251,9 @@ public class BuildCode { } else { outmethod.println(" struct ArrayObject * stringarray=allocate_newarray(STRINGARRAYTYPE, argc-1);"); } + if (state.THREAD) { + outmethod.println("initializethreads();"); + } outmethod.println(" for(i=1;i