This task.c patch is needed for RubberSheet to work from a CallModule
app.  The missing lock init causes RubberSheet to throw a "bad lock" error
and bail in one_task.

     The first part was in my 8/9/00 task patch but just didn't make it
into CVS.  And the latter I just happened to notice was missing in CVS
(there's an "end parallel" MarkTime below that it pairs with).

Randy

-- 
Randall Hopper (mailto:[EMAIL PROTECTED])
Lockheed Martin Operation Support
EPA Scientific Visualization Center
US EPA MD/24 ERC-1A; RTP, NC 27711
--- src/exec/libdx/ORIG/task.c  Thu Aug 24 16:10:49 2000
+++ src/exec/libdx/task.c       Tue Jun  5 15:08:35 2001
@@ -184,8 +184,10 @@
            return ERROR;
        if (!DXcreate_lock(&(ti->undone_lock), "undone DXlock"))
            return ERROR;
-       if (!DXcreate_lock(&(ti->done_flag), "extra tasks lock"))
+       if (!DXcreate_lock(&(ti->done_flag), "done flag"))
            return ERROR;
+       if (!DXcreate_lock(&(ti->extra_lock), "extra tasks lock"))
+           return ERROR;
 
        /* initialize them */
        DXlock(&(ti->done_flag), 0);    /* DXunlock to signal all tasks done */
@@ -408,6 +410,8 @@
 #endif
 
     }
+
+    DXMarkTime("start parallel");
 
     /* If master task group, sort the tasks and copy them to global memory */
     if (lti.ntasks > 0) {

Reply via email to