Changeset: 61c0ca76c5bf for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=61c0ca76c5bf
Modified Files:
        clients/Tests/exports.stable.out
        monetdb5/mal/mal_interpreter.c
        monetdb5/mal/mal_interpreter.h
Branch: default
Log Message:

Cleanup: runMALprocess is never called, so get rid of it.


diffs (92 lines):

diff --git a/clients/Tests/exports.stable.out b/clients/Tests/exports.stable.out
--- a/clients/Tests/exports.stable.out
+++ b/clients/Tests/exports.stable.out
@@ -3207,7 +3207,6 @@ str runFactory(Client cntxt, MalBlkPtr m
 str runMAL(Client c, MalBlkPtr mb, int startpc, MalBlkPtr mbcaller, MalStkPtr 
env, InstrPtr pcicaller);
 str runMALDebugger(Client cntxt, Symbol s);
 str runMALdataflow(Client cntxt, MalBlkPtr mb, int startpc, int stoppc, 
MalStkPtr stk, MalStkPtr env, InstrPtr pcicaller);
-str runMALprocess(Client cntxt, MalBlkPtr mb, MalStkPtr stk, int start, int 
stop);
 str runMALsequence(Client cntxt, MalBlkPtr mb, int startpc, int stoppc, 
MalStkPtr stk, MalStkPtr env, InstrPtr pcicaller);
 str runScenario(Client c);
 int runonceProp;
diff --git a/monetdb5/mal/mal_interpreter.c b/monetdb5/mal/mal_interpreter.c
--- a/monetdb5/mal/mal_interpreter.c
+++ b/monetdb5/mal/mal_interpreter.c
@@ -1256,66 +1256,6 @@ str runMALsequence(Client cntxt, MalBlkP
        return ret;
 }
 
-/* Independent threads
- * Distributed execution calls for asynchronous execution of MAL
- * instructions. To simplify the interpreter, we assume that all
- * the code to be executed is already grouped in a MAL function,
- * which is called independently. The result variables are initialized
- * to NIL before the code is started. When the process crashes,
- * an exception is raised.
- */
-typedef struct {
-       MT_Id tid;
-       Client cntxt;
-       MalBlkPtr mb;
-       MalStkPtr stk;
-       int start,stop;
-} Ptask;
-
-/* runMALdetached is typically called as part of
- * starting a separate interpreter thread.
- */
-static void
-runMALdetached(void *t)
-{
-       Ptask *p = (Ptask *)t;
-       Client cntxt = p->cntxt;
-       MalBlkPtr mb = p->mb;
-       MalStkPtr stk = p->stk;
-       int sve;
-       str msg = MAL_SUCCEED;
-
-#ifdef DEBUG_DETACHED
-       mnstr_printf(cntxt->fdout, "start thread in background\n");
-#endif
-       if (stk == NULL) {
-               GDKerror("mal.interpreter: " MAL_STACK_FAIL);
-               return;
-       }
-       sve = stk->keepAlive;
-       stk->keepAlive = TRUE;
-       msg = reenterMAL(cntxt, mb, p->start, p->stop, stk, 0, 0);
-       stk->keepAlive = sve;
-       if (msg != MAL_SUCCEED)
-               GDKerror("%s", msg);      /* indirect way to pass an error */
-#ifdef DEBUG_DETACHED
-       mnstr_printf(cntxt->fdout, "finished thread in background\n");
-#endif
-}
-str runMALprocess(Client cntxt, MalBlkPtr mb, MalStkPtr stk, int start, int 
stop)
-{
-       Ptask p;
-
-       p.cntxt = cntxt;
-       p.mb = mb;
-       p.stk = stk;
-       p.start = start;
-       p.stop = stop;
-
-       MT_create_thread(&p.tid, runMALdetached, &p, MT_THR_DETACHED);
-       return MAL_SUCCEED;
-}
-
 /* Safeguarding
  * The physical stack for each thread is an operating system parameter.
  * We do not want recursive programs crashing the server, so once in
diff --git a/monetdb5/mal/mal_interpreter.h b/monetdb5/mal/mal_interpreter.h
--- a/monetdb5/mal/mal_interpreter.h
+++ b/monetdb5/mal/mal_interpreter.h
@@ -48,7 +48,6 @@ mal_export void releaseBAT(MalBlkPtr mb,
 mal_export str malCommandCall(MalStkPtr stk, InstrPtr pci);
 mal_export void updateBigFoot(Client cntxt, int bid, int add);
 mal_export int isNotUsedIn(InstrPtr p, int start, int a);
-mal_export str runMALprocess(Client cntxt, MalBlkPtr mb, MalStkPtr stk, int 
start, int stop);
 mal_export str safeguardStack(Client cntxt, MalBlkPtr mb, MalStkPtr stk, 
InstrPtr pci);
 mal_export str catchKernelException(Client cntxt, str ret);
 
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to