Changeset: 29d9c3068b4a for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=29d9c3068b4a
Modified Files:
buildtools/autogen/autogen/am.py
Branch: default
Log Message:
Merge with Oct2010 branch.
diffs (truncated from 371 to 300 lines):
diff -r 973265cb00a2 -r 29d9c3068b4a MonetDB4/src/monet/monet_queue.mx
--- a/MonetDB4/src/monet/monet_queue.mx Wed Nov 24 12:41:12 2010 +0100
+++ b/MonetDB4/src/monet/monet_queue.mx Wed Nov 24 12:57:23 2010 +0100
@@ -121,12 +121,15 @@
m_export void QMclearStat(void);
#endif /* _MONET_QUEUE_H_ */
+/*
@}
@-
The number of requests entered in the queue is counted.
This counter is decremented when a requests is finished or forcefully removed
from the queue. If it becomes zero there aren't any requests left for
processing.
@{
+...@h
+*/
@c
#include "monetdb4_config.h"
#include "monet_deparse.h"
@@ -156,7 +159,7 @@
THRprintf(fp, buf);
}
-
+/*
@
@}
@-
@@ -165,6 +168,8 @@
The request immediately gets a unique time stamp for tracing.
@{
@c
+*/
+...@c
Request
newRequest(Cntxt stk, YYSTREE data, int barrier)
{
@@ -186,6 +191,7 @@
return p;
}
+/*
@
@}
@@ -195,6 +201,8 @@
one arbitrary monet Interpreter thread that stumbles on it.
@{
@c
+*/
+...@c
void
putkillRequest(void)
{
@@ -203,6 +211,7 @@
putRequest(m);
}
+/*
@
@}
@-
@@ -216,6 +225,8 @@
All code should pass the wakeupRequest point.
@{
@c
+*/
+...@c
int sem = 0;
char mybuf[16000], *myp = mybuf;
@@ -256,10 +267,9 @@
qm_last->ev_next = p;
qm_last = last;
}
-...@-
-Now that all requests have been added, we should identify those that
-are eligable for execution. Their state is set accordingly.
-...@c
+ /* Now that all requests have been added, we should identify
+ * those that are eligable for execution. Their state is set
+ * accordingly. */
for (; p; p = p->ev_next)
if (p->ev_status == 0) {
wakeupRequest(p);
@@ -321,6 +331,7 @@
monet_unset_lock(monet_critical, "nxtRequest");
}
+/*
@-
The getRequest function is protected by the semaphore, such that
the processes interested in a request are blocked until one becomes
@@ -328,6 +339,8 @@
thread. Then it should reset the status before leaving this scope.
The flag barrier searches requests that lower the barrier request first.
@c
+*/
+...@c
Request
getRequest(Request barrier)
{
@@ -347,7 +360,7 @@
}
for (q = qm_first; q; q = q->ev_next)
if (q->ev_status == EVPENDING) {
- if (q->ev_process == 0 || q->ev_process == tid) {
+ if ((q->ev_process == 0 && (q->ev_data != 0 || tid !=
1)) || q->ev_process == tid) {
goto getReq0;
}
}
@@ -370,6 +383,7 @@
return q;
}
+/*
@-
Some top level routines need access to the current queue request, so
as to prepare a dependency list. Since a thread may temporarily suspend
@@ -380,6 +394,8 @@
The corresponding unlink code has been written such that
this routine need not be placed in a critical section.
@c
+*/
+...@c
Request
thisRequest(void)
{
@@ -409,6 +425,7 @@
return NULL;
}
+/*
@
@}
@@ -418,6 +435,8 @@
It directly manipulates the stack and also gets rid of the
old requests.
@c
+*/
+...@c
void
rmRequest(Request r)
{
@@ -437,6 +456,7 @@
monet_unset_lock(monet_critical, "rmRequest");
}
+/*
@-
Once an event is handled the status field should be changed
to reflect the situation and any runable event should be detected.
@@ -446,6 +466,8 @@
@{
@c
+*/
+...@c
void
unlinkRequest(Request q)
{
@@ -465,6 +487,7 @@
}
+/*
@-
A request is immediately removed from the queue once it has been handled.
If the request was traced for performance, it is moved to the history queue,
@@ -481,6 +504,8 @@
The process id is invalidated to avoid collapses with thisRequest().
@c
+*/
+...@c
void
clrRequest(Request q)
{
@@ -503,8 +528,11 @@
monet_unset_lock(monet_critical, "clrRequest");
}
+/*
@- Request exeuction
@c
+*/
+...@c
int
handleRequest(Thread t, Request q, ValPtr res)
{
@@ -526,10 +554,8 @@
return 0;
}
-...@-
-This was needed to ensure proper delivery of output;
-A kill request is handled directly.
-...@c
+ /* This was needed to ensure proper delivery of output; A kill
+ * request is handled directly. */
if (lt == NULL) {
assert(stk == 0);
PARDEBUG {
@@ -571,6 +597,7 @@
}
}
+/*
@
@}
@@ -586,6 +613,8 @@
manipulation with queue keys returned by QMenqueue. They others are generated
internally.
@c
+*/
+...@c
int
QMenqueue(Cntxt stk, YYSTREE data, int barrier, int kill)
{
@@ -622,10 +651,13 @@
return 0;
}
+/*
@-
Dequeuing a request cascades to its dependents (in all directions).
This way the user need not keep track of all requests generated on the fly.
@c
+*/
+...@c
#if 0
static void
QMdequeue(int qkey)
@@ -651,9 +683,12 @@
}
#endif
+/*
@-
A request can be activated using the queue key.
@c
+*/
+...@c
void
QMwakeup(int qkey)
{
@@ -677,10 +712,13 @@
PARDEBUG THRprintf(GDKerr, "QMwakeup: qkey %d not found\n", qkey);
}
+/*
@-
The user is responsible for creation of a synchronization request to
align multiple parallel requests.
@c
+*/
+...@c
int
QMbefore(int qkey1, int qkey2)
{
@@ -700,10 +738,13 @@
return qkey2;
}
+/*
@-
The routine QMopen assess the queue and determines if we have
run out of eligable requests.
@c
+*/
+...@c
int
QMopen(void)
{
@@ -724,6 +765,7 @@
}
}
+/*
@
@+ Performance tracing
The performance of the Monet kernel can be traced at the level of
@@ -740,6 +782,8 @@
char qm_cmd[IDLENGTH];
@
@c
+*/
+...@c
Request qm_top, qm_bot;
int qm_profile = 0;
diff -r 973265cb00a2 -r 29d9c3068b4a buildtools/autogen/autogen/am.py
--- a/buildtools/autogen/autogen/am.py Wed Nov 24 12:41:12 2010 +0100
+++ b/buildtools/autogen/autogen/am.py Wed Nov 24 12:57:23 2010 +0100
@@ -72,7 +72,7 @@
res = []
for (pref,lib,sep,cond) in libs:
after = -1
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list