Index: trunk/kernel/kern/cluster.c
===================================================================
--- trunk/kernel/kern/cluster.c	(revision 14)
+++ trunk/kernel/kern/cluster.c	(revision 19)
@@ -1,5 +1,5 @@
 /*
  * cluster.c - Cluster-Manager related operations
- * 
+ *
  * Author  Ghassan Almaless (2008,2009,2010,2011,2012)
  *         Mohamed Lamine Karaoui (2015)
@@ -68,5 +68,5 @@
 
     // initialize cluster global parameters
-	cluster->paddr_width     = info->paddr_width; 
+	cluster->paddr_width     = info->paddr_width;
 	cluster->x_width         = info->x_width;
 	cluster->y_width         = info->y_width;
@@ -77,12 +77,12 @@
     // initialize cluster local parameters
 	cluster->cores_nr        = info->cores_nr;
-    cluster->cores_in_kernel = info->cores_nr;   // all cpus start in kernel mode
-
-    // initialize the lock protectig the embedded kcm allocator
+    cluster->cores_in_kernel = info->cores_nr; // all cpus start in kernel mode
+
+    // initialize the lock protecting the embedded kcm allocator
 	spinlock_init( &cluster->kcm_lock );
 
-    // initialises DQDT 
-    cluster->dqdt_root_level = dqdt_init( info->x_size, 
-                                          info->y_size, 
+    // initialises DQDT
+    cluster->dqdt_root_level = dqdt_init( info->x_size,
+                                          info->y_size,
                                           info->y_width );
     cluster->threads_var = 0;
@@ -96,6 +96,6 @@
     // initialises embedded KHM
 	khm_init( &cluster->khm );
-  
-    // initialises embedded KCM 
+
+    // initialises embedded KCM
 	kcm_init( &cluster->kcm , KMEM_KCM );
 
@@ -107,5 +107,5 @@
 	               info->core[lid].gid );      // gid from boot_info_t
 	}
-	
+
     // initialises RPC fifo
 	rpc_fifo_init( &cluster->rpc_fifo );
@@ -114,5 +114,5 @@
 	spinlock_init( &cluster->pmgr.pref_lock );
     cluster->pmgr.pref_nr = 0;
-    cluster->pmgr.pref_tbl[0] = XPTR( local_cxy , &process_zero );   
+    cluster->pmgr.pref_tbl[0] = XPTR( local_cxy , &process_zero );
     for( lpid = 1 ; lpid < CONFIG_MAX_PROCESS_PER_CLUSTER ; lpid++ )
     {
@@ -131,5 +131,5 @@
         cluster->pmgr.copies_nr[lpid] = 0;
         xlist_root_init( XPTR( local_cxy , &cluster->pmgr.copies_root[lpid] ) );
-    }    
+    }
 
     hal_wbflush();
@@ -148,6 +148,6 @@
     uint32_t y = cxy & ((1<<y_width)-1);
 
-    if( x >= cluster->x_size ) return true;  
-    if( y >= cluster->y_size ) return true;  
+    if( x >= cluster->x_size ) return true;
+    if( y >= cluster->y_size ) return true;
 
     return false;
@@ -188,5 +188,5 @@
             sel = lid;
         }
-    } 
+    }
     return sel;
 }
@@ -198,5 +198,5 @@
 //////////////////////////////////////////////////////////
 xptr_t cluster_get_reference_process_from_pid( pid_t pid )
-{ 
+{
     xptr_t xp;   // extended pointer on process descriptor
 
@@ -207,5 +207,5 @@
     lpid_t lpid      = LPID_FROM_PID( pid );
 
-    // Check valid PID 
+    // Check valid PID
     if( lpid >= CONFIG_MAX_PROCESS_PER_CLUSTER )
     {
@@ -215,5 +215,5 @@
 
     if( local_cxy == owner_cxy )   // local cluster is owner cluster
-    { 
+    {
         xp = cluster->pmgr.pref_tbl[lpid];
     }
@@ -264,5 +264,5 @@
     {
         error = EAGAIN;
-    }   
+    }
 
     // release the processs_manager lock
@@ -307,5 +307,5 @@
     list_entry_t * iter;
     process_t    * process;
-    
+
     LIST_FOREACH( root , iter )
     {
@@ -370,5 +370,5 @@
     xptr_t copies_entry = XPTR( local_cxy , &process->copies_list );
 
-    // get lock protecting copies_list[lpid] 
+    // get lock protecting copies_list[lpid]
     remote_spinlock_lock( copies_lock );
 
@@ -376,5 +376,5 @@
     hal_remote_atomic_add( XPTR( owner_cxy , &pm->copies_nr[lpid] ) , 1 );
 
-    // release lock protecting copies_list[lpid] 
+    // release lock protecting copies_list[lpid]
     remote_spinlock_unlock( copies_lock );
 }
@@ -396,5 +396,5 @@
     xptr_t copies_entry = XPTR( local_cxy , &process->copies_list );
 
-    // get lock protecting copies_list[lpid] 
+    // get lock protecting copies_list[lpid]
     remote_spinlock_lock( copies_lock );
 
@@ -402,5 +402,5 @@
     hal_remote_atomic_add( XPTR( owner_cxy , &pm->copies_nr[lpid] ) , -1 );
 
-    // release lock protecting copies_list[lpid] 
+    // release lock protecting copies_list[lpid]
     remote_spinlock_unlock( copies_lock );
 }
@@ -408,5 +408,5 @@
 ////////////////////////////////////////////////////////////////////////////////////////
 // TODO Il me semble que la seule chose que fait ce kernel thread à chaque réveil
-// est de mettre à jour la DQDT, et de se rendormir... A-t-on besoin d'un thread ? [AG] 
+// est de mettre à jour la DQDT, et de se rendormir... A-t-on besoin d'un thread ? [AG]
 //////////////////////////////////////////////////////////////////////////////////////////
 
@@ -437,6 +437,6 @@
 	isRootMgr = (cluster == root_home) ? true : false;
 	cntr      = 0;
-	period    = (isRootMgr) ? 
-		CONFIG_DQDT_ROOTMGR_PERIOD * MSEC_PER_TICK : 
+	period    = (isRootMgr) ?
+		CONFIG_DQDT_ROOTMGR_PERIOD * MSEC_PER_TICK :
 		CONFIG_DQDT_MGR_PERIOD * MSEC_PER_TICK;
 
@@ -444,5 +444,5 @@
 	event_set_priority(&event, E_CHR);
 	event_set_handler(&event, &manager_alarm_event_handler);
-  
+
 	info.event = &event;
 	thread_preempt_disable(CURRENT_THREAD);
@@ -459,7 +459,7 @@
 			if((cntr % 10) == 0)
 			{
-				printk(INFO, "INFO: cpu %d, DQDT update ended [ %u - %u ]\n", 
-				       cpu_id, 
-				       tm_end, 
+				printk(INFO, "INFO: cpu %d, DQDT update ended [ %u - %u ]\n",
+				       cpu_id,
+				       tm_end,
 				       tm_end - tm_start);
 
@@ -480,7 +480,7 @@
 {
 	struct thread_s *manager;
- 
+
 	manager = event_get_senderId(event);
- 
+
 	thread_preempt_disable(CURRENT_THREAD);
 
@@ -488,5 +488,5 @@
 
 	sched_wakeup(manager);
-  
+
 	thread_preempt_enable(CURRENT_THREAD);
 
@@ -513,5 +513,5 @@
 	{
 		ckey->val = key;
-		cluster->keys_tbl[key] = (void *) 0x1; // Reserved 
+		cluster->keys_tbl[key] = (void *) 0x1; // Reserved
 		cluster->next_key = key;
 		event_set_error(event, 0);
