Index: trunk/kernel/kern/cluster.c
===================================================================
--- trunk/kernel/kern/cluster.c	(revision 583)
+++ trunk/kernel/kern/cluster.c	(revision 593)
@@ -113,8 +113,9 @@
 
 #if DEBUG_CLUSTER_INIT
-uint32_t cycle = (uint32_t)hal_get_cycles();
+uint32_t   cycle = (uint32_t)hal_get_cycles();
+thread_t * this  = CURRENT_THREAD;
 if( DEBUG_CLUSTER_INIT < cycle )
-printk("\n[DBG] %s : thread %x in process %x enters for cluster %x / cycle %d\n",
-__FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid, local_cxy , cycle );
+printk("\n[%s] thread[%x,%x] enters for cluster %x / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, local_cxy , cycle );
 #endif
 
@@ -132,5 +133,5 @@
 cycle = (uint32_t)hal_get_cycles();
 if( DEBUG_CLUSTER_INIT < cycle )
-printk("\n[DBG] %s : PPM initialized in cluster %x / cycle %d\n",
+printk("\n[%s] PPM initialized in cluster %x / cycle %d\n",
 __FUNCTION__ , local_cxy , cycle );
 #endif
@@ -142,5 +143,5 @@
 cycle = (uint32_t)hal_get_cycles();
 if( DEBUG_CLUSTER_INIT < cycle )
-printk("\n[DBG] %s : KHM initialized in cluster %x at cycle %d\n",
+printk("\n[%s] KHM initialized in cluster %x at cycle %d\n",
 __FUNCTION__ , local_cxy , hal_get_cycles() );
 #endif
@@ -152,5 +153,5 @@
 cycle = (uint32_t)hal_get_cycles();
 if( DEBUG_CLUSTER_INIT < cycle )
-printk("\n[DBG] %s : KCM initialized in cluster %x at cycle %d\n",
+printk("\n[%s] KCM initialized in cluster %x at cycle %d\n",
 __FUNCTION__ , local_cxy , hal_get_cycles() );
 #endif
@@ -167,5 +168,5 @@
 cycle = (uint32_t)hal_get_cycles();
 if( DEBUG_CLUSTER_INIT < cycle )
-printk("\n[DBG] %s : cores initialized in cluster %x / cycle %d\n",
+printk("\n[%s] cores initialized in cluster %x / cycle %d\n",
 __FUNCTION__ , local_cxy , cycle );
 #endif
@@ -181,5 +182,5 @@
 cycle = (uint32_t)hal_get_cycles();
 if( DEBUG_CLUSTER_INIT < cycle )
-printk("\n[DBG] %s : RPC fifo inialized in cluster %x at cycle %d\n",
+printk("\n[%s] RPC fifo inialized in cluster %x at cycle %d\n",
 __FUNCTION__ , local_cxy , hal_get_cycles() );
 #endif
@@ -212,6 +213,6 @@
 cycle = (uint32_t)hal_get_cycles();
 if( DEBUG_CLUSTER_INIT < cycle )
-printk("\n[DBG] %s : thread %x in process %x exit for cluster %x / cycle %d\n",
-__FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid , local_cxy , cycle );
+printk("\n[%s] thread[%x,%x] exit for cluster %x / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, local_cxy, cycle );
 #endif
 
@@ -430,8 +431,9 @@
 
 #if DEBUG_CLUSTER_PID_ALLOC
-uint32_t cycle = (uint32_t)hal_get_cycles();
+uint32_t   cycle = (uint32_t)hal_get_cycles();
+thread_t * this  = CURRENT_THREAD;
 if( DEBUG_CLUSTER_PID_ALLOC < cycle )
-printk("\n[DBG] %s : thread %x enters in cluster %x / cycle %d\n",
-__FUNCTION__ , CURRENT_THREAD , local_cxy , cycle );
+printk("\n[%s] thread[%x,%x] enters in cluster %x / cycle %d\n",
+__FUNCTION__ , this->process->pid , this->trdid , local_cxy , cycle );
 #endif
 
@@ -477,6 +479,6 @@
 cycle = (uint32_t)hal_get_cycles();
 if( DEBUG_CLUSTER_PID_ALLOC < cycle )
-printk("\n[DBG] %s : thread %x exit in cluster %x / pid %x / cycle %d\n",
-__FUNCTION__ , CURRENT_THREAD , local_cxy , *pid , cycle );
+printk("\n[%s] thread[%x,%x] exit in cluster %x / cycle %d\n",
+__FUNCTION__ , this->process->pid , this->trdid , local_cxy , cycle );
 #endif
 
@@ -488,8 +490,9 @@
 
 #if DEBUG_CLUSTER_PID_RELEASE
-uint32_t cycle = (uint32_t)hal_get_cycles();
-if( DEBUG_CLUSTER_PID_RELEASE < cycle )
-printk("\n[DBG] %s : thread %x enters in cluster %x / pid %x / cycle %d\n",
-__FUNCTION__ , CURRENT_THREAD , local_cxy , pid , cycle );
+uint32_t   cycle = (uint32_t)hal_get_cycles();
+thread_t * this  = CURRENT_THREAD;
+if( DEBUG_CLUSTER_PID_ALLOC < cycle )
+printk("\n[%s] thread[%x,%x] enters in cluster %x / pid %x / cycle %d\n",
+__FUNCTION__ , this->process->pid , this->trdid , local_cxy , pid, cycle );
 #endif
 
@@ -519,7 +522,7 @@
 #if DEBUG_CLUSTER_PID_RELEASE
 cycle = (uint32_t)hal_get_cycles();
-if( DEBUG_CLUSTER_PID_RELEASE < cycle )
-printk("\n[DBG] %s : thread %x exit in cluster %x / cycle %d\n",
-__FUNCTION__ , CURRENT_THREAD , local_cxy , cycle );
+if( DEBUG_CLUSTER_PID_ALLOC < cycle )
+printk("\n[%s] thread[%x,%x] exit in cluster %x / cycle %d\n",
+__FUNCTION__ , this->process->pid , this->trdid , local_cxy , cycle );
 #endif
 
@@ -599,8 +602,9 @@
 
 #if DEBUG_CLUSTER_PROCESS_COPIES
-uint32_t cycle = (uint32_t)hal_get_cycles();
+uint32_t   cycle = (uint32_t)hal_get_cycles();
+thread_t * this  = CURRENT_THREAD;
 if( DEBUG_CLUSTER_PROCESS_COPIES < cycle )
-printk("\n[DBG] %s enters / cluster %x / process %x / cycle %d\n",
-__FUNCTION__ , local_cxy , process , cycle );
+printk("\n[%s] thread[%x,%x] enters for process %x / cycle %d\n",
+__FUNCTION__ , this->process->pid , this->trdid , process->pid , cycle );
 #endif
 
@@ -632,6 +636,6 @@
 cycle = (uint32_t)hal_get_cycles();
 if( DEBUG_CLUSTER_PROCESS_COPIES < cycle )
-printk("\n[DBG] %s exit / cluster %x / process %x / cycle %d\n",
-__FUNCTION__ , local_cxy , process , cycle );
+printk("\n[%s] thread[%x,%x] exit for process %x / cycle %d\n",
+__FUNCTION__ , this->process->pid , this->trdid , process->pid , cycle );
 #endif
 
@@ -644,8 +648,9 @@
 
 #if DEBUG_CLUSTER_PROCESS_COPIES
-uint32_t cycle = (uint32_t)hal_get_cycles();
+uint32_t   cycle = (uint32_t)hal_get_cycles();
+thread_t * this  = CURRENT_THREAD;
 if( DEBUG_CLUSTER_PROCESS_COPIES < cycle )
-printk("\n[DBG] %s enters / cluster %x / process %x / cycle %d\n",
-__FUNCTION__ , local_cxy , process , cycle );
+printk("\n[%s] thread[%x,%x] enters for process %x / cycle %d\n",
+__FUNCTION__ , this->process->pid , this->trdid , process->pid , cycle );
 #endif
 
@@ -674,6 +679,6 @@
 cycle = (uint32_t)hal_get_cycles();
 if( DEBUG_CLUSTER_PROCESS_COPIES < cycle )
-printk("\n[DBG] %s exit / cluster %x / process %x / cycle %d\n",
-__FUNCTION__ , local_cxy , process , cycle );
+printk("\n[%s] thread[%x,%x] exit for process %x / cycle %d\n",
+__FUNCTION__ , this->process->pid , this->trdid , process->pid , cycle );
 #endif
 
