Changeset: 34395ce0699d for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=34395ce0699d
Modified Files:
monetdb5/mal/mal_runtime.c
Branch: unlock
Log Message:
merged
diffs (79 lines):
diff --git a/monetdb5/mal/mal.c b/monetdb5/mal/mal.c
--- a/monetdb5/mal/mal.c
+++ b/monetdb5/mal/mal.c
@@ -98,7 +98,6 @@ void mal_reset(void)
{
GDKprepareExit();
MCstopClients(0);
- dropQRYqueue();
setHeartbeat(-1);
stopProfiler(0);
AUTHreset();
diff --git a/monetdb5/mal/mal_runtime.c b/monetdb5/mal/mal_runtime.c
--- a/monetdb5/mal/mal_runtime.c
+++ b/monetdb5/mal/mal_runtime.c
@@ -30,17 +30,6 @@ QueryQueue QRYqueue = NULL;
size_t qsize = 0, qhead = 0, qtail = 0;
static oid qtag= 1; // A unique query identifier
-void
-mal_runtime_reset(void)
-{
- GDKfree(QRYqueue);
- QRYqueue = NULL;
- qsize = 0;
- qtag= 1;
- qhead = 0;
- qtail = 0;
-}
-
static str
isaSQLquery(MalBlkPtr mb){
int i;
@@ -93,7 +82,7 @@ advanceQRYqueue(void)
if( s){
/* don;t wipe them when they are still running, prepared, or
paused */
/* The upper layer has assured there is at least one slot
available */
- if(QRYqueue[qhead].status == 0 || (QRYqueue[qhead].status[0] !=
'r' && QRYqueue[qhead].status[0] != 'p')){
+ if(QRYqueue[qhead].status != 0 && (QRYqueue[qhead].status[0] ==
'r' || QRYqueue[qhead].status[0] == 'p')){
advanceQRYqueue();
return;
}
@@ -104,7 +93,7 @@ advanceQRYqueue(void)
}
}
-void
+static void
dropQRYqueue(void)
{
size_t i;
@@ -229,6 +218,17 @@ runtimeProfileFinish(Client cntxt, MalBl
MT_lock_unset(&mal_delayLock);
}
+/* Used by mal_reset to do the grand final clean up of this area before
MonetDB exits */
+void
+mal_runtime_reset(void)
+{
+ dropQRYqueue();
+ qsize = 0;
+ qtag= 1;
+ qhead = 0;
+ qtail = 0;
+}
+
/*
* Each MAL instruction is executed by a single thread, which means we can
* keep a simple working set around to make Stethscope attachement easy.
diff --git a/monetdb5/mal/mal_runtime.h b/monetdb5/mal/mal_runtime.h
--- a/monetdb5/mal/mal_runtime.h
+++ b/monetdb5/mal/mal_runtime.h
@@ -53,7 +53,6 @@ mal_export void runtimeProfileInit(Clien
mal_export void runtimeProfileFinish(Client cntxt, MalBlkPtr mb, MalStkPtr
stk);
mal_export void runtimeProfileBegin(Client cntxt, MalBlkPtr mb, MalStkPtr stk,
InstrPtr pci, RuntimeProfile prof);
mal_export void runtimeProfileExit(Client cntxt, MalBlkPtr mb, MalStkPtr stk,
InstrPtr pci, RuntimeProfile prof);
-mal_export void dropQRYqueue(void);
mal_export lng getVolume(MalStkPtr stk, InstrPtr pci, int rd);
mal_export lng getBatSpace(BAT *b);
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list