Index: trunk/kernel/kern/core.c
===================================================================
--- trunk/kernel/kern/core.c	(revision 14)
+++ trunk/kernel/kern/core.c	(revision 19)
@@ -1,5 +1,5 @@
 /*
  * core.c - core descriptor access function.
- * 
+ *
  * Author  Ghassan Almaless (2008,2009,2010,2011,2012)
  *         Mohamed Lamine Karaoui (2015)
@@ -41,6 +41,6 @@
 
 /////////////////////////////////
-void core_init( core_t    * core, 
-                lid_t       lid, 
+void core_init( core_t    * core,
+                lid_t       lid,
                 gid_t       gid )
 {
@@ -53,13 +53,13 @@
 	core->usage             = 0;
 	core->spurious_irqs     = 0;
-    core->rpc_threads       = 0;
+	core->rpc_threads       = 0;
 
 	rpc_fifo_init( &core->rpc_fifo );
 
-    list_root_init( &core->rpc_free_list );
-
-    core->thread_rpc        = NULL;
-    core->thread_idle       = NULL;
-    core->fpu_owner         = NULL;
+	list_root_init( &core->rpc_free_list );
+
+	core->thread_rpc        = NULL;
+	core->thread_idle       = NULL;
+	core->fpu_owner         = NULL;
 	core->rand_last         =  hal_time_stamp() & 0xFFF;
 
@@ -70,8 +70,8 @@
 inline uint32_t core_get_rand( core_t * core )
 {
-    uint32_t value  = ((core->rand_last * CONFIG_RDNG_PARAM_A) +
-                        CONFIG_RDNG_PARAM_C) ^ (hal_time_stamp() & 0xFFF);
-    core->rand_last = value;
-    return value;
+	uint32_t value  = ((core->rand_last * CONFIG_RDNG_PARAM_A) +
+	                    CONFIG_RDNG_PARAM_C) ^ (hal_time_stamp() & 0xFFF);
+	core->rand_last = value;
+	return value;
 }
 
@@ -79,18 +79,18 @@
 inline uint64_t core_get_cycles( core_t * core )
 {
-    uint32_t elapsed;
-    uint64_t cycles;
+	uint32_t elapsed;
+	uint64_t cycles;
 	uint32_t time_stamp = core->time_stamp;
 	uint32_t time_now   = hal_time_stamp();
-	
+
 	// compute number of elapsed cycles, taking into account 32 bits register wrap
 	if(time_now < time_stamp) elapsed = (0xFFFFFFFF - time_stamp) + time_now;
 	else                      elapsed = (time_now - time_stamp);
 
-    cycles = core->cycles + elapsed;
-
-    // update core time
-    core->time_stamp = time_now;
-    core->cycles     = cycles;
+	cycles = core->cycles + elapsed;
+
+	// update core time
+	core->time_stamp = time_now;
+	core->cycles     = cycles;
 	hal_wbflush();
 
@@ -100,15 +100,15 @@
 ////////////////////////////////////
 void core_get_time( core_t   * core,
-                    uint32_t * tm_ms, 
+                    uint32_t * tm_ms,
                     uint32_t * tm_us )
 {
 	// uint64_t cycles = core_get_cycles( core );
 
-    // TODO ces deux ligne ne compilent pas : "undefined referenc to __udivdi3"
+	// TODO ces deux ligne ne compilent pas : "undefined referenc to __udivdi3"
 
 	// *tm_ms = (cycles / CONFIG_CYCLES_PER_MS);
 	// *tm_us = (cycles % CONFIG_CYCLES_PER_MS) / (CONFIG_CYCLES_PER_MS / 1000000);
 
-    printk("\n[PANIC] in %s : not implemented yet\n", __FUNCTION__ );
+	printk("\n[PANIC] in %s : not implemented yet\n", __FUNCTION__ );
 }
 
@@ -116,5 +116,5 @@
 void core_time_update( core_t * core )
 {
-    uint32_t elapsed;
+	uint32_t elapsed;
 	uint32_t ticks_nr   = core->ticks_nr;
 	uint64_t cycles     = core->cycles;
@@ -122,8 +122,8 @@
 	uint32_t time_now   = hal_time_stamp();
 
-    // compute number of elapsed cycles taking into account 32 bits register wrap 
+	// compute number of elapsed cycles taking into account 32 bits register wrap
 	if( time_now < time_stamp ) elapsed = (0xFFFFFFFF - time_stamp) + time_now;
 	else                        elapsed = time_now - time_stamp;
-    
+
 	cycles  += elapsed;
 	ticks_nr = elapsed / core->ticks_period;
@@ -140,23 +140,23 @@
 	uint32_t ticks;
 
-    // update cycles and ticks counter
+	// update cycles and ticks counter
 	core_time_update( core );
 
-    // get current ticks number
+	// get current ticks number
 	ticks = core->ticks_nr;
 
-    // handle pending alarms TODO ??? [AG]
+	// handle pending alarms TODO ??? [AG]
 	// alarm_clock( &core->alarm_mgr , ticks );
 
-    // handle scheduler TODO  improve the scheduling condition ... AG
-    if( (ticks % 10) == 0 ) sched_yield();
-	
-    // update DQDT TODO  This update should depend on the cluster identifier,
-    // to avoid simultaneous updates from various clusters ... AG
+	// handle scheduler TODO  improve the scheduling condition ... AG
+	if( (ticks % 10) == 0 ) sched_yield();
+
+	// update DQDT TODO  This update should depend on the cluster identifier,
+	// to avoid simultaneous updates from various clusters ... AG
 	if( ((ticks % CONFIG_DQDT_PERIOD) == 0) && (core->lid == 0) ) dqdt_global_update();
 }
 
 ////////////////////////////////////////
-void core_compute_stats( core_t * core ) 
+void core_compute_stats( core_t * core )
 {
 	thread_t * idle  = core->thread_idle;
@@ -167,5 +167,5 @@
 	uint32_t   usage;
 
-    // compute cumulated usage       
+	// compute cumulated usage
 	ticks         = (ticks) ? ticks : 1;
 	idle_percent  = (idle->ticks_nr * 100) / ticks;
@@ -174,5 +174,5 @@
 	usage         = (busy_percent + core->usage) / 2;
 
-    // update core descriptor
+	// update core descriptor
 	core->usage = usage;
 	hal_wbflush();
@@ -204,6 +204,6 @@
                                 chdev_t  * chdev )
 {
-    if     ( irq_type == WTI_TYPE ) core->wti_vector[irq_id] = chdev;
-    else if( irq_type == HWI_TYPE ) core->hwi_vector[irq_id] = chdev;
-    else                            core->pti_vector[irq_id] = chdev;
-}
+	if     ( irq_type == WTI_TYPE ) core->wti_vector[irq_id] = chdev;
+	else if( irq_type == HWI_TYPE ) core->hwi_vector[irq_id] = chdev;
+	else                            core->pti_vector[irq_id] = chdev;
+}
