Index: trunk/kernel/kern/chdev.c
===================================================================
--- trunk/kernel/kern/chdev.c	(revision 583)
+++ trunk/kernel/kern/chdev.c	(revision 593)
@@ -174,6 +174,6 @@
 uint32_t rx_cycle = (uint32_t)hal_get_cycles();
 if( (is_rx) && (DEBUG_CHDEV_CMD_RX < rx_cycle) )
-printk("\n[DBG] %s : client_thread %x (%s) enter for RX / server = %x / cycle %d\n",
-__FUNCTION__, this, thread_type_str(this->type) , server_ptr, rx_cycle );
+printk("\n[%s] client[%x,%x] enter for RX / server[%x,%x] / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, server_ptr->process->pid, server_ptr->trdid, rx_cycle );
 #endif
 
@@ -181,6 +181,6 @@
 uint32_t tx_cycle = (uint32_t)hal_get_cycles();
 if( (is_rx == 0) && (DEBUG_CHDEV_CMD_TX < tx_cycle) )
-printk("\n[DBG] %s : client_thread %x (%s) enter for TX / server = %x / cycle %d\n",
-__FUNCTION__, this, thread_type_str(this->type) , server_ptr, tx_cycle );
+printk("\n[%s] client[%x,%x] enter for TX / server[%x,%x] / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, server_ptr->process->pid, server_ptr->trdid, tx_cycle );
 #endif
 
@@ -222,10 +222,12 @@
 #if (DEBUG_CHDEV_CMD_TX & 1)
 if( (is_rx == 0) && (DEBUG_CHDEV_CMD_TX < tx_cycle) )
-printk("\n[DBG] in %s : client thread %x blocked\n", __FUNCTION__, this );
+printk("\n[%s] client thread[%x,%x] blocked\n",
+__FUNCTION__, this->process_pid, this->trdid );
 #endif
 
 #if (DEBUG_CHDEV_CMD_RX & 1)
 if( (is_rx) && (DEBUG_CHDEV_CMD_RX < rx_cycle) )
-printk("\n[DBG] in %s : client thread %x blocked\n", __FUNCTION__, this );
+printk("\n[%s] client thread[%x,%x] blocked\n",
+__FUNCTION__, this->process_pid, this->trdid );
 #endif
 
@@ -236,10 +238,12 @@
 #if (DEBUG_CHDEV_CMD_TX & 1)
 if( (is_rx == 0) && (DEBUG_CHDEV_CMD_TX < tx_cycle) )
-printk("\n[DBG] in %s : TX server thread %x unblocked\n", __FUNCTION__, server_ptr );
+printk("\n[%s] TX server thread[%x,%x] unblocked\n",
+__FUNCTION__, server_ptr->process->pid, server_ptr->trdid );
 #endif
 
 #if (DEBUG_CHDEV_CMD_RX & 1)
 if( (is_rx) && (DEBUG_CHDEV_CMD_RX < rx_cycle) )
-printk("\n[DBG] in %s : RX server thread %x unblocked\n", __FUNCTION__, server_ptr );
+printk("\n[%s] RX server thread[%x,%x] unblocked\n",
+__FUNCTION__, server_ptr->process->pid, server_ptr->trdid );
 #endif
 
@@ -249,10 +253,12 @@
 #if (DEBUG_CHDEV_CMD_TX & 1)
 if( (is_rx == 0)  && (DEBUG_CHDEV_CMD_TX < tx_cycle) )
-printk("\n[DBG] in %s : thread %x registered write request in chdev\n", __FUNCTION__, this );
+printk("\n[%s] client thread[%x,%x] registered write request in chdev\n",
+__FUNCTION__, this->process->pid, this->trdid );
 #endif
  
 #if (DEBUG_CHDEV_CMD_RX & 1)
 if( (is_rx)  && (DEBUG_CHDEV_CMD_RX < rx_cycle) )
-printk("\n[DBG] in %s : thread %x registered read request in chdev\n", __FUNCTION__, this );
+printk("\n[%s] client thread[%x,%x] registered read request in chdev\n",
+__FUNCTION__, this->process->pid, this->trdid );
 #endif
  
@@ -264,12 +270,12 @@
 #if (DEBUG_CHDEV_CMD_TX & 1)
 if( (is_rx == 0)  && (DEBUG_CHDEV_CMD_TX < tx_cycle) )
-printk("\n[DBG] in %s : client thread %x sent IPI to TX server thread %x\n",
-__FUNCTION__, this, server_ptr );
+printk("\n[%s] client thread[%x,%x] sent IPI to TX server thread[%x,%x]\n",
+__FUNCTION__, this->process->pid, this->trdid, server_ptr->process->pid, server_ptr->trdid );
 #endif
 
 #if (DEBUG_CHDEV_CMD_RX & 1)
 if( (is_rx)  && (DEBUG_CHDEV_CMD_RX < rx_cycle) )
-printk("\n[DBG] in %s : client thread %x sent IPI to RX server thread %x\n",
-__FUNCTION__, this, server_ptr );
+printk("\n[%s] client thread[%x,%x] sent IPI to RX server thread[%x,%x]\n",
+__FUNCTION__, this->process->pid, this->trdid, server_ptr->process->pid, server_ptr->trdid );
 #endif
 
@@ -288,6 +294,6 @@
 rx_cycle = (uint32_t)hal_get_cycles();
 if( (is_rx) && (DEBUG_CHDEV_CMD_RX < rx_cycle) )
-printk("\n[DBG] %s : client_thread %x (%s) exit for RX / cycle %d\n",
-__FUNCTION__, this, thread_type_str(this->type) , rx_cycle );
+printk("\n[%s] client_thread[%x,%x] exit for RX / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, rx_cycle );
 #endif
 
@@ -295,6 +301,6 @@
 tx_cycle = (uint32_t)hal_get_cycles();
 if( (is_rx == 0) && (DEBUG_CHDEV_CMD_TX < tx_cycle) )
-printk("\n[DBG] %s : client_thread %x (%s) exit for TX / cycle %d\n",
-__FUNCTION__, this, thread_type_str(this->type) , tx_cycle );
+printk("\n[%s] client_thread[%x,%x] exit for TX / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, tx_cycle );
 #endif
 
@@ -335,6 +341,6 @@
 uint32_t rx_cycle = (uint32_t)hal_get_cycles();
 if( (chdev->is_rx) && (DEBUG_CHDEV_SERVER_RX < rx_cycle) )
-printk("\n[DBG] %s : dev_thread %x start RX / cycle %d\n",
-__FUNCTION__ , server->trdid , rx_cycle );
+printk("\n[%s] dev_thread[%x,%x] start RX / cycle %d\n",
+__FUNCTION__ , server->process->pid, server->trdid, rx_cycle );
 #endif
 
@@ -342,6 +348,6 @@
 uint32_t tx_cycle = (uint32_t)hal_get_cycles();
 if( (chdev->is_rx == 0) && (DEBUG_CHDEV_SERVER_TX < tx_cycle) )
-printk("\n[DBG] %s : dev_thread %x start TX / cycle %d\n",
-__FUNCTION__ , server->trdid , tx_cycle );
+printk("\n[%s] dev_thread[%x,%x] start TX / cycle %d\n",
+__FUNCTION__ , server->process->pid, server->trdid, tx_cycle );
 #endif
 
@@ -356,6 +362,6 @@
 rx_cycle = (uint32_t)hal_get_cycles();
 if( (chdev->is_rx) && (DEBUG_CHDEV_SERVER_RX < rx_cycle) )
-printk("\n[DBG] %s : dev_thread %x found RX queue empty => blocks / cycle %d\n",
-__FUNCTION__ , server->trdid , rx_cycle );
+printk("\n[%s] dev_thread[%x,%x] found RX queue empty => blocks / cycle %d\n",
+__FUNCTION__ , server->process->pid, server->trdid, rx_cycle );
 #endif
 
@@ -363,6 +369,6 @@
 tx_cycle = (uint32_t)hal_get_cycles();
 if( (chdev->is_rx == 0) && (DEBUG_CHDEV_SERVER_TX < tx_cycle) )
-printk("\n[DBG] %s : dev_thread %x found TX queue empty => blocks / cycle %d\n",
-__FUNCTION__ , server->trdid , tx_cycle );
+printk("\n[%s] dev_thread[%x,%x] found TX queue empty => blocks / cycle %d\n",
+__FUNCTION__ , server->process->pid, server->trdid, tx_cycle );
 #endif
 
@@ -398,6 +404,7 @@
 rx_cycle = (uint32_t)hal_get_cycles();
 if( (chdev->is_rx) && (DEBUG_CHDEV_SERVER_RX < rx_cycle) )
-printk("\n[DBG] %s : dev_thread %x for RX found client thread %x in process %x / cycle %d\n",
-__FUNCTION__, server->trdid ,client_ptr->trdid ,client_ptr->process->pid, rx_cycle );
+printk("\n[%s] dev_thread[%x,%x] for RX get client thread[%x,%x] / cycle %d\n",
+__FUNCTION__, server->process->pid, server->trdid,
+client_ptr->process->pid, client_ptr->trdid, rx_cycle );
 #endif
 
@@ -405,6 +412,7 @@
 tx_cycle = (uint32_t)hal_get_cycles();
 if( (chdev->is_rx == 0) && (DEBUG_CHDEV_SERVER_TX < tx_cycle) )
-printk("\n[DBG] %s : dev_thread %x for TX found client thread %x in process %x / cycle %d\n",
-__FUNCTION__, server->trdid ,client_ptr->trdid ,client_ptr->process->pid, tx_cycle );
+printk("\n[%s] dev_thread[%x,%x] for TX get client thread[%x,%x] / cycle %d\n",
+__FUNCTION__, server->process->pid, server->trdid,
+client_ptr->process->pid, client_ptr->trdid, tx_cycle );
 #endif
 
@@ -426,6 +434,7 @@
 rx_cycle = (uint32_t)hal_get_cycles();
 if( (chdev->is_rx) && (DEBUG_CHDEV_SERVER_RX < rx_cycle) )
-printk("\n[DBG] %s : dev_thread %x completes RX for client %x in process %x / cycle %d\n",
-__FUNCTION__, server->trdid, client_ptr->trdid, client_ptr->process->pid, rx_cycle );
+printk("\n[%s] dev_thread[%x,%x] completes RX for client thread[%x,%x] / cycle %d\n",
+__FUNCTION__, server->process->pid, server->trdid,
+client_ptr->process->pid, client_ptr->trdid, rx_cycle );
 #endif
 
@@ -433,6 +442,7 @@
 tx_cycle = (uint32_t)hal_get_cycles();
 if( (chdev->is_rx == 0) && (DEBUG_CHDEV_SERVER_TX < tx_cycle) )
-printk("\n[DBG] %s : dev_thread %x completes TX for client %x in process %x / cycle %d\n",
-__FUNCTION__, server->trdid, client_ptr->trdid, client_ptr->process->pid, tx_cycle );
+printk("\n[%s] dev_thread[%x,%x] completes TX for client thread[%x,%x] / cycle %d\n",
+__FUNCTION__, server->process->pid, server->trdid,
+client_ptr->process->pid, client_ptr->trdid, tx_cycle );
 #endif
 
