[prev in list] [next in list] [prev in thread] [next in thread]
List: monetdb-checkins
Subject: MonetDB: sciql - Merging.
From: mk () cwi ! nl
Date: 2010-11-27 9:45:37
Message-ID: hg.83961ea19e8b.1290851137.6315528441665844383 () localhost ! localdomain
[Download RAW message or body]
Changeset: 83961ea19e8b for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=83961ea19e8b
Modified Files:
MonetDB5/src/optimizer/opt_mitosis.mx
sql/src/server/rel_schema.c
sql/src/server/rel_semantic.c
sql/src/server/sql_parser.y
Branch: sciql
Log Message:
Merging.
diffs (truncated from 21620 to 300 lines):
diff -r 1680743af067 -r 83961ea19e8b MonetDB/configure.ag
--- a/MonetDB/configure.ag Tue Nov 23 00:14:15 2010 +0100
+++ b/MonetDB/configure.ag Sat Nov 27 09:33:14 2010 +0100
@@ -110,7 +110,6 @@
AC_CHECK_FUNCS([memset fcntl ftime getopt getrlimit getuid kill \
lockf nanosleep pipe setenv shutdown strdup strtof uname \
strtoll fsync])
-AC_CHECK_DECLS([strdup, strtof])
dnl provide different versions of the paths derived above
diff -r 1680743af067 -r 83961ea19e8b MonetDB/src/common/monet_options.mx
--- a/MonetDB/src/common/monet_options.mx Tue Nov 23 00:14:15 2010 +0100
+++ b/MonetDB/src/common/monet_options.mx Sat Nov 27 09:33:14 2010 +0100
@@ -120,13 +120,6 @@
# include "getopt1.c"
#endif
-#if !HAVE_DECL_STRDUP
-#ifdef HAVE_STRDUP
-extern char *strdup(const char *);
-#else
-#define strdup(s) strcpy(malloc(strlen(s)+1),(s))
-#endif
-#endif
#ifdef NATIVE_WIN32
#define strdup _strdup
#define getpid _getpid
diff -r 1680743af067 -r 83961ea19e8b MonetDB/src/common/stream.mx
--- a/MonetDB/src/common/stream.mx Tue Nov 23 00:14:15 2010 +0100
+++ b/MonetDB/src/common/stream.mx Sat Nov 27 09:33:14 2010 +0100
@@ -359,13 +359,6 @@
int (*fsetpos) (stream *s, lng p);
};
-#if !HAVE_DECL_STRDUP
-#ifdef HAVE_STRDUP
-extern char *strdup(const char *);
-#else
-#define strdup(s) strcpy(malloc(strlen(s)+1),(s))
-#endif
-#endif
#ifdef NATIVE_WIN32
#define strdup _strdup
#endif
@@ -3201,6 +3194,8 @@
void
bstream_destroy(bstream *s)
{
+ s->s->close(s->s);
+ s->s->destroy(s->s);
free(s->buf);
free(s);
}
diff -r 1680743af067 -r 83961ea19e8b MonetDB/src/gdk/gdk_atoms.mx
--- a/MonetDB/src/gdk/gdk_atoms.mx Tue Nov 23 00:14:15 2010 +0100
+++ b/MonetDB/src/gdk/gdk_atoms.mx Sat Nov 27 09:33:14 2010 +0100
@@ -1689,10 +1689,6 @@
@:atomtostr(dbl,"%.17g",double)@
@:atom_io(dbl,Lng,lng)@
-#if defined(HAVE_STRTOF) && !HAVE_DECL_STRTOF
-extern float strtof(const char *, char **);
-#endif
-
int
fltFromStr(char *src, int *len, flt **dst)
{
diff -r 1680743af067 -r 83961ea19e8b MonetDB/src/gdk/gdk_utils.mx
--- a/MonetDB/src/gdk/gdk_utils.mx Tue Nov 23 00:14:15 2010 +0100
+++ b/MonetDB/src/gdk/gdk_utils.mx Sat Nov 27 09:33:14 2010 +0100
@@ -277,7 +277,7 @@
@c
#include <signal.h>
#if 0 /* these are unused */
-static RETSIGTYPE
+static void
BATSIGignore(int nr)
{
GDKsyserror("! ERROR signal %d caught by thread " SZFMT "\n", nr, (size_t) \
MT_getpid()); @@ -285,7 +285,7 @@
#endif
#ifdef WIN32
-static RETSIGTYPE
+static void
BATSIGabort(int nr)
{
GDKfatal("BATSIGabort: signal %d caught by thread " SZFMT "\n", nr, (size_t) \
MT_getpid()); @@ -293,14 +293,14 @@
#endif
#ifndef NATIVE_WIN32
-static RETSIGTYPE
+static void
BATSIGinterrupt(int nr)
{
GDKexit(nr);
}
#ifdef SIGCHLD
-static RETSIGTYPE
+static void
BATSIGchild(int nr)
{
int status;
diff -r 1680743af067 -r 83961ea19e8b MonetDB4/configure.ag
--- a/MonetDB4/configure.ag Tue Nov 23 00:14:15 2010 +0100
+++ b/MonetDB4/configure.ag Sat Nov 27 09:33:14 2010 +0100
@@ -310,11 +310,9 @@
if test x$cross_compiling != xyes; then
AC_FUNC_SETPGRP()
fi
-AC_TYPE_SIGNAL()
-AC_FUNC_VPRINTF()
AC_FUNC_MEMCMP()
AC_CHECK_FUNCS(strsignal)
-AC_CHECK_FUNCS(mkdir rmdir getcwd getopt getrlimit vsnprintf snprintf kill pipe \
setsid) +AC_CHECK_FUNCS(mkdir rmdir getcwd getopt getrlimit kill pipe setsid)
AC_CHECK_FUNCS(strcspn strdup strstr strtod strtol strerror strcasecmp strncasecmp)
AC_CHECK_FUNCS(strtoll strtoull)
AC_CHECK_FUNCS(gethostname setenv putenv select)
diff -r 1680743af067 -r 83961ea19e8b MonetDB4/src/modules/plain/alarm.mx
--- a/MonetDB4/src/modules/plain/alarm.mx Tue Nov 23 00:14:15 2010 +0100
+++ b/MonetDB4/src/modules/plain/alarm.mx Sat Nov 27 09:33:14 2010 +0100
@@ -141,7 +141,7 @@
#undef SIG_ERR /*((__sighandler_t)-1 ) */
#define SIG_ERR ((__sighandler_t)-1L)
#endif
-static RETSIGTYPE
+static void
CLKsignal(int nr)
{
int restype;
diff -r 1680743af067 -r 83961ea19e8b MonetDB4/src/monet/monet.mx
--- a/MonetDB4/src/monet/monet.mx Tue Nov 23 00:14:15 2010 +0100
+++ b/MonetDB4/src/monet/monet.mx Sat Nov 27 09:33:14 2010 +0100
@@ -697,9 +697,6 @@
adds = width+10;
add = (str) alloca((int)adds);
}
-#ifndef HAVE_SNPRINTF
- sprintf(add, meta, @1);
-#else
n = snprintf( add, adds, meta, @1 );
while (n < 0 || (size_t) n >= adds) {
if (n >= 0) /* glibc 2.1 */
@@ -709,7 +706,6 @@
add = (str) alloca ((int)adds);
n = snprintf( add, adds, meta, @1 );
}
-#endif /* HAVE_SNPRINTF */
@c
static char toofew_error[80] = "monet_sprintf(): at least %d parameters \
expected.\n"; static char format_error[80] = "monet_sprintf(): error in format \
before param %d.\n"; @@ -723,9 +719,7 @@
int
monet_sprintf(str *res, str format, va_list ap)
{
-#ifdef HAVE_SNPRINTF
int n;
-#endif /* HAVE_SNPRINTF */
int prec = 0, dotseen = 0, escaped = 0, type, size, argc = 1;
size_t adds = 100, width = 0;
@@ -856,10 +850,6 @@
return_error(type_error);
}
width += (1 + prec);
-#ifndef HAVE_SNPRINTF
- /* Brute force; this size always fits a double */
- width += 300;
-#endif /* HAVE_SNPRINTF */
@:sprintf(dval)@
} else if (*cur == 's') {
int length;
diff -r 1680743af067 -r 83961ea19e8b MonetDB4/src/monet/monet_queue.mx
--- a/MonetDB4/src/monet/monet_queue.mx Tue Nov 23 00:14:15 2010 +0100
+++ b/MonetDB4/src/monet/monet_queue.mx Sat Nov 27 09:33:14 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
+*/
_______________________________________________
Checkin-list mailing list
Checkin-list@monetdb.org
http://mail.monetdb.org/mailman/listinfo/checkin-list
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic