Index: trunk/kernel/kern/kernel_init.c
===================================================================
--- trunk/kernel/kern/kernel_init.c	(revision 437)
+++ trunk/kernel/kern/kernel_init.c	(revision 438)
@@ -125,5 +125,5 @@
 // these debug variables are used to analyse the sys_read() syscall timing
 
-#if CONFIG_DEBUG_SYS_READ
+#if DEBUG_SYS_READ
 uint32_t   enter_sys_read;
 uint32_t   exit_sys_read;
@@ -150,5 +150,5 @@
 // these debug variables are used to analyse the sys_write() syscall timing
 
-#if CONFIG_DEBUG_SYS_WRITE    
+#if DEBUG_SYS_WRITE    
 uint32_t   enter_sys_write;
 uint32_t   exit_sys_write;
@@ -324,6 +324,6 @@
             }
 
-#if( CONFIG_DEBUG_KERNEL_INIT & 0x1 )
-if( hal_time_stamp() > CONFIG_DEBUG_KERNEL_INIT )
+#if( DEBUG_KERNEL_INIT & 0x1 )
+if( hal_time_stamp() > DEBUG_KERNEL_INIT )
 printk("\n[DBG] %s : created MMC in cluster %x / chdev = %x\n",
 __FUNCTION__ , local_cxy , chdev_ptr );
@@ -353,6 +353,6 @@
                 chdev_dir.dma[channel] = XPTR( local_cxy , chdev_ptr );
 
-#if( CONFIG_DEBUG_KERNEL_INIT & 0x1 )
-if( hal_time_stamp() > CONFIG_DEBUG_KERNEL_INIT )
+#if( DEBUG_KERNEL_INIT & 0x1 )
+if( hal_time_stamp() > DEBUG_KERNEL_INIT )
 printk("\n[DBG] %s : created DMA[%d] in cluster %x / chdev = %x\n",
 __FUNCTION__ , channel , local_cxy , chdev_ptr );
@@ -488,6 +488,6 @@
                     }
 
-#if( CONFIG_DEBUG_KERNEL_INIT & 0x1 )
-if( hal_time_stamp() > CONFIG_DEBUG_KERNEL_INIT )
+#if( DEBUG_KERNEL_INIT & 0x1 )
+if( hal_time_stamp() > DEBUG_KERNEL_INIT )
 printk("\n[DBG] %s : create chdev %s / channel = %d / rx = %d / cluster %x / chdev = %x\n",
 __FUNCTION__ , chdev_func_str( func ), channel , rx , local_cxy , chdev );
@@ -623,6 +623,6 @@
     } 
 
-#if( CONFIG_DEBUG_KERNEL_INIT & 0x1 )
-if( hal_time_stamp() > CONFIG_DEBUG_KERNEL_INIT )
+#if( DEBUG_KERNEL_INIT & 0x1 )
+if( hal_time_stamp() > DEBUG_KERNEL_INIT )
 {
     printk("\n[DBG] %s created PIC chdev in cluster %x at cycle %d\n",
@@ -807,6 +807,6 @@
     /////////////////////////////////////////////////////////////////////////////////
 
-#if CONFIG_DEBUG_KERNEL_INIT
-if( (core_lid ==  0) && (local_cxy == 0) ) 
+#if DEBUG_KERNEL_INIT
+if( (core_lid ==  0) & (local_cxy == 0) ) 
 printk("\n[DBG] %s : exit barrier 0 : TXT0 initialized / cycle %d\n",
 __FUNCTION__, (uint32_t)hal_get_cycles() );
@@ -845,6 +845,6 @@
     /////////////////////////////////////////////////////////////////////////////////
 
-#if CONFIG_DEBUG_KERNEL_INIT
-if( (core_lid ==  0) && (local_cxy == 0) ) 
+#if DEBUG_KERNEL_INIT
+if( (core_lid ==  0) & (local_cxy == 0) ) 
 printk("\n[DBG] %s : exit barrier 1 : clusters initialised / cycle %d\n",
 __FUNCTION__, (uint32_t)hal_get_cycles() );
@@ -872,6 +872,6 @@
     ////////////////////////////////////////////////////////////////////////////////
 
-#if CONFIG_DEBUG_KERNEL_INIT
-if( (core_lid ==  0) && (local_cxy == 0) ) 
+#if DEBUG_KERNEL_INIT
+if( (core_lid ==  0) & (local_cxy == 0) ) 
 printk("\n[DBG] %s : exit barrier 2 : PIC initialised / cycle %d\n",
 __FUNCTION__, (uint32_t)hal_get_cycles() );
@@ -905,11 +905,11 @@
     /////////////////////////////////////////////////////////////////////////////////
 
-#if CONFIG_DEBUG_KERNEL_INIT
-if( (core_lid ==  0) && (local_cxy == 0) ) 
+#if DEBUG_KERNEL_INIT
+if( (core_lid ==  0) & (local_cxy == 0) ) 
 printk("\n[DBG] %s : exit barrier 3 : all chdev initialised / cycle %d\n",
 __FUNCTION__, (uint32_t)hal_get_cycles() );
 #endif
 
-#if( CONFIG_DEBUG_KERNEL_INIT & 1 )
+#if( DEBUG_KERNEL_INIT & 1 )
 chdev_dir_display();
 #endif
@@ -927,9 +927,9 @@
 
     // all cores initialize the idle thread descriptor
-    error = thread_kernel_init( thread,
-                                THREAD_IDLE,
-                                &thread_idle_func,
-                                NULL,
-                                core_lid );
+    error = thread_idle_init( thread,
+                              THREAD_IDLE,
+                              &thread_idle_func,
+                              NULL,
+                              core_lid );
     if( error )
     {
@@ -942,5 +942,5 @@
     core->scheduler.idle = thread;
 
-#if( CONFIG_DEBUG_KERNEL_INIT & 1 )
+#if( DEBUG_KERNEL_INIT & 1 )
 sched_display( core_lid );
 #endif
@@ -1014,6 +1014,6 @@
     /////////////////////////////////////////////////////////////////////////////////
 
-#if CONFIG_DEBUG_KERNEL_INIT
-if( (core_lid ==  0) && (local_cxy == 0) ) 
+#if DEBUG_KERNEL_INIT
+if( (core_lid ==  0) & (local_cxy == 0) ) 
 printk("\n[DBG] %s : exit barrier 4 : VFS_root = %l in cluster 0 / cycle %d\n",
 __FUNCTION__, vfs_root_inode_xp , (uint32_t)hal_get_cycles());
@@ -1075,6 +1075,6 @@
     /////////////////////////////////////////////////////////////////////////////////
 
-#if CONFIG_DEBUG_KERNEL_INIT
-if( (core_lid ==  0) && (local_cxy == io_cxy) ) 
+#if DEBUG_KERNEL_INIT
+if( (core_lid ==  0) & (local_cxy == 0) ) 
 printk("\n[DBG] %s : exit barrier 5 : VFS_root = %l in cluster %x / cycle %d\n",
 __FUNCTION__, vfs_root_inode_xp , io_cxy , (uint32_t)hal_get_cycles());
@@ -1110,6 +1110,6 @@
     /////////////////////////////////////////////////////////////////////////////////
 
-#if CONFIG_DEBUG_KERNEL_INIT
-if( (core_lid ==  0) && (local_cxy == io_cxy) )
+#if DEBUG_KERNEL_INIT
+if( (core_lid ==  0) & (local_cxy == 0) ) 
 printk("\n[DBG] %s : exit barrier 6 : dev_root = %l in cluster %x / cycle %d\n",
 __FUNCTION__, devfs_dev_inode_xp , io_cxy , (uint32_t)hal_get_cycles() );
@@ -1149,6 +1149,6 @@
     /////////////////////////////////////////////////////////////////////////////////
 
-#if CONFIG_DEBUG_KERNEL_INIT
-if( (core_lid ==  0) && (local_cxy == 0) ) 
+#if DEBUG_KERNEL_INIT
+if( (core_lid ==  0) & (local_cxy == 0) ) 
 printk("\n[DBG] %s : exit barrier 7 : dev_root = %l in cluster 0 / cycle %d\n",
 __FUNCTION__, devfs_dev_inode_xp , (uint32_t)hal_get_cycles() );
@@ -1162,5 +1162,5 @@
     {
 
-#if( CONFIG_DEBUG_KERNEL_INIT & 1 )
+#if( DEBUG_KERNEL_INIT & 1 )
 vfs_display( vfs_root_inode_xp );
 #endif
@@ -1175,6 +1175,6 @@
     /////////////////////////////////////////////////////////////////////////////////
 
-#if CONFIG_DEBUG_KERNEL_INIT
-if( (core_lid ==  0) && (local_cxy == 0) ) 
+#if DEBUG_KERNEL_INIT
+if( (core_lid ==  0) & (local_cxy == 0) ) 
 printk("\n[DBG] %s : exit barrier 8 : process init created / cycle %d\n", 
 __FUNCTION__ , (uint32_t)hal_get_cycles() );
@@ -1189,5 +1189,5 @@
         print_banner( (info->x_size * info->y_size) , info->cores_nr );
 
-#if( CONFIG_DEBUG_KERNEL_INIT & 1 )
+#if( DEBUG_KERNEL_INIT & 1 )
 printk("\n\n***** memory fooprint for main kernel objects\n\n"
                    " - thread descriptor  : %d bytes\n"
