Changeset: 404b6227f024 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=404b6227f024
Modified Files:
        monetdb5/extras/crackers/crackers_pq.c
        tools/merovingian/daemon/client.c
        tools/merovingian/daemon/forkmserver.c
        tools/merovingian/daemon/merovingian.c
Branch: default
Log Message:

Merge with Aug2011 branch.


diffs (truncated from 706 to 300 lines):

diff --git a/monetdb5/extras/crackers/crackers_AVL_tree.mx 
b/monetdb5/extras/crackers/crackers_AVL_tree.mx
--- a/monetdb5/extras/crackers/crackers_AVL_tree.mx
+++ b/monetdb5/extras/crackers/crackers_AVL_tree.mx
@@ -72,7 +72,6 @@ void printAVLTree(struct Node * current,
 void printAVLTreeIncrementalSideways(struct Node * current, BAT *b, BUN base);
 struct Node * getFirstNode(struct Node * node);
 struct Node * getLastNode(struct Node * node);
-struct Node * getPreviousNodeAny(struct Node * current);
 struct Node * getPreviousNonLocalNode(struct Node * current);
 struct Node * getNextNonLocalNode(struct Node * current);
 @
@@ -100,20 +99,22 @@ struct NodeSimple * InsertTreeSimple_@1(
 #include "crackers.h"
 
 /* Local support functions and macros */
+@:AVLtreeLocalFunctions3()@
 @:AVLtreeLocalFunctions2()@
 @:AVLtreeLocalFunctions2(Simple)@
 @:AVLtreeLocalFunctions@
 
 /* Functions shared within the crackers module/library */
 @:AVLtreeSharedFunctions_impl_0()@
-@:AVLtreeSharedFunctions_impl_0(Simple)@
+@:AVLtreeSharedFunctions_impl_0(Simple,static)@
+@:AVLtreeSharedFunctions_impl_3()@
 @:AVLtreeSharedFunctions_impl_2@
 @:TypeSwitch(AVLtreeSharedFunctions_impl_1)@
 /*
  * @-Functions shared within the crackers module/library
  */
 @= AVLtreeSharedFunctions_impl_0
-int
+ @2 int
 Height@1(struct Node@1 * x){
         if( x == NULL )
                 return -1;
@@ -121,7 +122,7 @@ Height@1(struct Node@1 * x){
                 return x->height;
 }
 
-struct Node@1 *
+ @2 struct Node@1 *
 SingleRotateLeft@1(struct Node@1 ** head, struct Node@1 * node){
         struct Node@1 * l, *lr;
        int nodeLh,nodeRh,lh;
@@ -160,7 +161,7 @@ SingleRotateLeft@1(struct Node@1 ** head
         return l;
 }
 
-struct Node@1 *
+ @2 struct Node@1 *
 SingleRotateRight@1(struct Node@1 ** head, struct Node@1 * node){
         struct Node@1 * r, *rl;
        int nodeLh,nodeRh,rh;
@@ -201,27 +202,29 @@ SingleRotateRight@1(struct Node@1 ** hea
         return r;
 }
 
-struct Node@1 *
+ @2 struct Node@1 *
 DoubleRotateLeft@1(struct Node@1 **head, struct Node@1 * node){
             node->left = SingleRotateRight@1(head, node->left);
             return SingleRotateLeft@1(head, node);
 }
 
-struct Node@1 *
+ @2 struct Node@1 *
 DoubleRotateRight@1(struct Node@1 **head, struct Node@1 * node){
             node->right = SingleRotateLeft@1(head, node->right);
             return SingleRotateRight@1(head, node);
 }
+@
 
-struct Node@1 *
-findPreviousPieceWalkingBack@1(struct Node@1 * node){
-       struct Node@1 * res = NULL, *current = node;
+@= AVLtreeSharedFunctions_impl_3
+struct Node *
+findPreviousPieceWalkingBack(struct Node * node){
+       struct Node * res = NULL, *current = node;
 
        if (current == NULL)
                return NULL;
 
        if (current->left != NULL)
-                res= getP@1(current->left);
+                res= getP(current->left);
        if (res != NULL)
                return res;
 
@@ -239,21 +242,21 @@ findPreviousPieceWalkingBack@1(struct No
                if (current->deleted == FALSE)
                        res = current;
                else if (current->left != NULL)
-                       res= getP@1(current->left);
+                       res= getP(current->left);
        }
        
        return res;
 }
 
-struct Node@1 *
-findNextPiece@1(struct Node@1 * node){
-       struct Node@1 * res = NULL, *current = node;
+struct Node *
+findNextPiece(struct Node * node){
+       struct Node * res = NULL, *current = node;
 
        if (current == NULL)
                return NULL;
 
        if (current->right != NULL)
-                res= getN@1(current->right);
+                res= getN(current->right);
        if (res != NULL)
                return res;
 
@@ -271,20 +274,20 @@ findNextPiece@1(struct Node@1 * node){
                if (current->deleted == FALSE)
                        res = current;
                else if (current->right != NULL)
-                       res= getN@1(current->right);
+                       res= getN(current->right);
        }
        
        return res;
 }
 
 void
-FreeAVLTree@1(struct Node@1 * current){
+FreeAVLTree(struct Node * current){
 
        if (current->left != NULL)
-               FreeAVLTree@1(current->left);
+               FreeAVLTree(current->left);
 
        if (current->right != NULL)
-               FreeAVLTree@1(current->right);
+               FreeAVLTree(current->right);
 
        GDKfree(current);
                
@@ -293,9 +296,9 @@ FreeAVLTree@1(struct Node@1 * current){
 
 
 /* Get the piece that holds the lowest values */
-struct Node@1 *
-getFirstNode@1(struct Node@1 * node){
-        struct Node@1 *res=NULL, *cur;
+struct Node *
+getFirstNode(struct Node * node){
+        struct Node *res=NULL, *cur;
         cur = node;
         while(cur != NULL){
                 res = cur;
@@ -309,9 +312,9 @@ getFirstNode@1(struct Node@1 * node){
 }
 
 /* Get the piece that holds the highest values */
-struct Node@1 *
-getLastNode@1(struct Node@1 * node){
-        struct Node@1 *res=NULL, *cur;
+struct Node *
+getLastNode(struct Node * node){
+        struct Node *res=NULL, *cur;
         cur = node;
         while(cur != NULL){
                 res = cur;
@@ -1189,7 +1192,7 @@ getNextNonLocalNode(struct Node * curren
 }
 
 @
-@= AVLtreeLocalFunctions2
+@= AVLtreeLocalFunctions3
 
 static struct Node@1 *
 getP@1(struct Node@1 * current){
@@ -1229,8 +1232,11 @@ getN@1(struct Node@1 * current){
        return res;
 }
 
+@
+@= AVLtreeLocalFunctions2
+
 /* Get the previous node in the tree (in terms of value), the result can be 
any node, deleted or no */
-struct Node@1 *
+static struct Node@1 *
 getPreviousNodeAny@1(struct Node@1 * current){
        struct Node@1 *res = NULL;
 
diff --git a/monetdb5/extras/crackers/crackers_joins.mx 
b/monetdb5/extras/crackers/crackers_joins.mx
--- a/monetdb5/extras/crackers/crackers_joins.mx
+++ b/monetdb5/extras/crackers/crackers_joins.mx
@@ -281,7 +281,7 @@ crackers_export str CRKsortBandJoin_@1(i
 @
 @c
 /* serves both normal equi-join (nil_on_miss==NULL) and outerjoin 
(nil_on_miss=nil) */
-lng
+static lng
 CRKmergejoin(BAT *bn,BAT *l, BAT *r){
        ptr nil_on_miss=NULL;
        BUN *limit =NULL;
@@ -408,7 +408,7 @@ CRKmergejoin(BAT *bn,BAT *l, BAT *r){
 @
 @c
 
-lng
+static lng
 CRKjoin(BAT *bn, BAT *l, BAT *r) {
        ptr v, nil = ATOMnilptr(r->htype);
        BUN p, q;
@@ -4055,7 +4055,8 @@ str CRKFullAlignment_@1_@5(int *res, int
 @
 @= JoinFunctions_impl_2
 
-str SinglePassJoinPutTuple_@1(@1 *value, oid *id, struct Node *current, BUN 
baseLeft, BAT * indexLeft, BAT *firstPieceBAT, struct Node *prevNode){
+#if 0
+static str SinglePassJoinPutTuple_@1(@1 *value, oid *id, struct Node *current, 
BUN baseLeft, BAT * indexLeft, BAT *firstPieceBAT, struct Node *prevNode){
 
        @1 *bound;  
        if (current == NULL){
@@ -4078,8 +4079,9 @@ str SinglePassJoinPutTuple_@1(@1 *value,
                
        return MAL_SUCCEED;
 }
-
-str cacheConsciousAlignJoinStep_@1(BAT *mapLeft, BAT *mapRight, struct Node 
*curNodeRight, oid startPos, oid endPos, BAT *indexRight, BUN baseRight, BAT * 
indexLeft, int mapLpos, oid cacheThreshold, struct Node *firstNodeRight, struct 
Node *lastNodeRight, BAT *res){
+#endif
+
+static str cacheConsciousAlignJoinStep_@1(BAT *mapLeft, BAT *mapRight, struct 
Node *curNodeRight, oid startPos, oid endPos, BAT *indexRight, BUN baseRight, 
BAT * indexLeft, int mapLpos, oid cacheThreshold, struct Node *firstNodeRight, 
struct Node *lastNodeRight, BAT *res){
        oid newPosition=0;
        struct Node *temp, *prevNodeRight;
        BAT * viewHeadRight=NULL, *viewRight=NULL, *viewLeft=NULL, 
*markedViewRight=NULL;
@@ -4320,7 +4322,7 @@ str CRKsortBandJoin_@1(int *resid, int *
        return MAL_SUCCEED;
 }
 
-void cacheConsciousAlignStep_@1(BAT *mapLeft, struct Node *curNodeRight, oid 
startPos, oid endPos, BAT *indexRight, BUN baseRight, BAT * indexLeft, int 
mapLpos, oid cacheThreshold, oid RightStartPos, oid RightEndPos){
+static void cacheConsciousAlignStep_@1(BAT *mapLeft, struct Node 
*curNodeRight, oid startPos, oid endPos, BAT *indexRight, BUN baseRight, BAT * 
indexLeft, int mapLpos, oid cacheThreshold, oid RightStartPos, oid RightEndPos){
        oid newPosition=0;
        @1 bound = *(@1*)Tloc(indexRight, baseRight + curNodeRight->position);
        
@@ -4341,7 +4343,8 @@ void cacheConsciousAlignStep_@1(BAT *map
        }
 }
 
-void alignStep_@1(BAT *mapLeft, struct Node *curNodeRight, oid startPos, oid 
endPos, BAT *indexRight, BUN baseRight, BAT * indexLeft, int mapLpos){
+#if 0
+static void alignStep_@1(BAT *mapLeft, struct Node *curNodeRight, oid 
startPos, oid endPos, BAT *indexRight, BUN baseRight, BAT * indexLeft, int 
mapLpos){
        oid newPosition=0;
        @1 bound = *(@1*)Tloc(indexRight, baseRight + curNodeRight->position);
        
@@ -4358,4 +4361,5 @@ void alignStep_@1(BAT *mapLeft, struct N
                        alignStep_@1(mapLeft, curNodeRight->right, 
newPosition+1, endPos, indexRight, baseRight, indexLeft, mapLpos);
        }
 }
+#endif
 @
diff --git a/monetdb5/extras/crackers/crackers_partial_sideways.mx 
b/monetdb5/extras/crackers/crackers_partial_sideways.mx
--- a/monetdb5/extras/crackers/crackers_partial_sideways.mx
+++ b/monetdb5/extras/crackers/crackers_partial_sideways.mx
@@ -169,7 +169,7 @@ CRKMaxTailIncrementalSideways_@1_@2(int 
 @
  * @- Local support functions and macros
 @= pieceReferencesManagement
-void
+static void
 newReference(int m, int batid){
        struct referencesNode *newNode, *cur;
 
@@ -227,7 +227,7 @@ CRKclearReferences(int* res, int *bid){
        return MAL_SUCCEED;
 }
 
-void 
+static void 
 registerMapReference(struct Node *CBnode, int batId){
        struct referencesNode *newNode, *cur;
 
@@ -248,7 +248,7 @@ registerMapReference(struct Node *CBnode
         return;
 }
 
-void 
+static void 
 clearMapReference(struct Node *CBnode, int batId){
        struct referencesNode *prev, *cur;
 /*     struct Node *temp;*/
@@ -309,7 +309,7 @@ printf("\n\n Trying to remove a piece th
         return;
 }
 
-oid getTapeCursor(struct Node *CBnode, int batId){
+static oid getTapeCursor(struct Node *CBnode, int batId){
        struct referencesNode *cur;
 
        cur = CBnode->references;
@@ -323,7 +323,7 @@ oid getTapeCursor(struct Node *CBnode, i
        return 0;
 } 
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to