Index: trunk/libs/libpthread/pthread.c
===================================================================
--- trunk/libs/libpthread/pthread.c	(revision 619)
+++ trunk/libs/libpthread/pthread.c	(revision 637)
@@ -230,19 +230,17 @@
 
 ////////////////////////////////////////////////////////////////////////////////////////////
-// The following functions define another implementation for the POSX barrier
-// based on a distributed quadtree implemented in user space, and relying
-// on a busy waiting policy.
-////////////////////////////////////////////////////////////////////////////////////////////
-
-
-////////////////////////////////////////////////////////////////////////////////////////////
-// This recursive function initializes the SQT nodes 
-// traversing the SQT from root to bottom
-////////////////////////////////////////////////////////////////////////////////////////////
-static void sqt_barrier_build( pthread_barrier_t  * barrier, 
+// The following functions define another implementation for the POSX barrier, based on
+// a distributed quad tree implemented in user space, but using a busy waiting policy.
+////////////////////////////////////////////////////////////////////////////////////////////
+
+
+////////////////////////////////////////////////////////////////////////////////////////////
+// This recursive function initializes the DQT nodes traversing the SQT from root to bottom
+////////////////////////////////////////////////////////////////////////////////////////////
+static void dqt_barrier_build( pthread_barrier_t  * barrier, 
                                unsigned int         x,
                                unsigned int         y,
                                unsigned int         level,
-                               sqt_node_t         * parent,
+                               dqt_node_t         * parent,
                                unsigned int         x_size,
                                unsigned int         y_size,
@@ -250,5 +248,5 @@
 {
     // get target node address
-    sqt_node_t * node = barrier->node[x][y][level];
+    dqt_node_t * node = barrier->node[x][y][level];
     
     if (level == 0 )        // terminal case
@@ -266,5 +264,5 @@
 
 #if PTHREAD_BARRIER_DEBUG
-printf("\n[BARRIER] %s : sqt_node[%d][%d][%d] / arity %d / desc %x\n"
+printf("\n[BARRIER] %s : dqt_node[%d][%d][%d] / arity %d / desc %x\n"
 "parent %x / child0 %x / child1 %x / child2 %x / child3 %x\n", 
 __FUNCTION__, x, y, level, node->arity, node, node->parent, 
@@ -312,5 +310,5 @@
 
 #if PTHREAD_BARRIER_DEBUG
-printf("\n[BARRIER] %s : sqt_node[%d][%d][%d] / arity %d / desc %x\n"
+printf("\n[BARRIER] %s : dqt_node[%d][%d][%d] / arity %d / desc %x\n"
 "parent %x / child0 %x / child1 %x / child2 %x / child3 %x\n", 
 __FUNCTION__, x, y, level, node->arity, node, node->parent,
@@ -322,5 +320,5 @@
         {
             if ( (cx[i] < x_size) && (cy[i] < y_size) ) 
-            sqt_barrier_build( barrier, 
+            dqt_barrier_build( barrier, 
                                cx[i], 
                                cy[i], 
@@ -332,5 +330,5 @@
         }
     }
-}  // end sqt_barrier_build()
+}  // end dqt_barrier_build()
 
 ////////////////////////////////////////////////////////////////
@@ -394,9 +392,9 @@
                      ( (l == 4) && ((x&0x0F) == 0) && ((y&0x0F) == 0) ) )
                  {
-                     sqt_node_t * node = remote_malloc( sizeof(sqt_node_t) , cxy ); 
+                     dqt_node_t * node = remote_malloc( sizeof(dqt_node_t) , cxy ); 
 
                      if( node == NULL )
                      {
-                         printf("\n[ERROR] in %s : cannot allocate sqt_node in cluster %x\n",
+                         printf("\n[ERROR] in %s : cannot allocate dqt_node in cluster %x\n",
                          __FUNCTION__ , cxy );
                          return -1;
@@ -411,5 +409,5 @@
             
     // recursively initialize all SQT nodes from root to bottom
-    sqt_barrier_build( barrier,
+    dqt_barrier_build( barrier,
                        0,        
                        0,
@@ -428,8 +426,8 @@
 //////////////////////////////////////////////////////////////////////////////////////////
 // This recursive function decrements the distributed "count" variables,
-// traversing the SQT from bottom to root.
+// traversing the DQT from bottom to root.
 // The last arrived thread reset the local node before returning.
 //////////////////////////////////////////////////////////////////////////////////////////
-static void sqt_barrier_decrement( sqt_node_t * node )
+static void dqt_barrier_decrement( dqt_node_t * node )
 {
 
@@ -457,5 +455,5 @@
     {
         // decrement the parent node if the current node is not the root
-        if ( node->parent != NULL )  sqt_barrier_decrement( node->parent );
+        if ( node->parent != NULL )  dqt_barrier_decrement( node->parent );
 
 #if PTHREAD_BARRIER_DEBUG
@@ -484,5 +482,5 @@
         return;
     }
-} // end sqt_barrier_decrement()
+} // end dqt_barrier_decrement()
     
 ///////////////////////////////////////////////////////
@@ -504,5 +502,5 @@
 
     // recursively decrement count from bottom to root
-    sqt_barrier_decrement( barrier->node[x][y][0] );
+    dqt_barrier_decrement( barrier->node[x][y][0] );
 
     hal_user_fence();
