Index: trunk/kernel/kern/rpc.c
===================================================================
--- trunk/kernel/kern/rpc.c	(revision 315)
+++ trunk/kernel/kern/rpc.c	(revision 337)
@@ -98,5 +98,7 @@
                                 page_t  ** page )      // out 
 {
-    rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 
     assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n");
@@ -116,5 +118,7 @@
     *page    = (page_t *)(intptr_t)rpc.args[1];
 
-    rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 }
 
@@ -122,5 +126,7 @@
 void rpc_pmem_get_pages_server( xptr_t xp )
 {
-    rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 
     // get client cluster identifier and pointer on RPC descriptor
@@ -137,5 +143,7 @@
     hal_remote_swd( XPTR( cxy , &desc->args[1] ) , (uint64_t)(intptr_t)page );
 
-    rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 }
 
@@ -150,5 +158,7 @@
                                    pid_t     * pid )     // out
 {
-    rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 
     assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n");
@@ -169,5 +179,7 @@
     *error  = (error_t)rpc.args[2];     
 
-    rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 }
 
@@ -179,5 +191,7 @@
     pid_t       pid;       // output : process identifier
 
-    rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 
     // get client cluster identifier and pointer on RPC descriptor
@@ -196,5 +210,7 @@
     hal_remote_sw( XPTR( client_cxy , &desc->args[1] ) , (uint64_t)pid );
 
-    rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 }
 
@@ -209,5 +225,7 @@
                               error_t     * error )   // out
 {
-    rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 
     assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n");
@@ -227,5 +245,7 @@
     *error  = (error_t)rpc.args[1];     
 
-    rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 }
 
@@ -237,5 +257,7 @@
     error_t       error;     // local error error status
 
-    rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 
     // get client cluster identifier and pointer on RPC descriptor
@@ -257,5 +279,7 @@
     hal_remote_swd( XPTR( client_cxy , &desc->args[1] ) , (uint64_t)error );
 
-    rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 }
 
@@ -268,5 +292,7 @@
 void rpc_process_kill_client( process_t * process ) 
 {
-    rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 
     // only reference cluster can send this RPC
@@ -300,5 +326,7 @@
     }
 
-    rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 }  
 
@@ -309,5 +337,7 @@
     process_t * process;  
 
-    rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 
     // get client cluster identifier and pointer on RPC descriptor
@@ -331,5 +361,7 @@
     }
 
-    rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 } 
 
@@ -348,5 +380,7 @@
                                     error_t        * error )      // out 
 {
-    rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 
     assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n");
@@ -370,5 +404,7 @@
     *error     = (error_t)rpc.args[5];
 
-    rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 }
 
@@ -386,5 +422,7 @@
     error_t          error;
 
-    rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 
     // get client cluster identifier and pointer on RPC descriptor
@@ -419,5 +457,7 @@
     hal_remote_swd( XPTR( client_cxy , &desc->args[2] ) , (uint64_t)thread_xp );
 
-    rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 }
 
@@ -434,5 +474,7 @@
                                       error_t * error )      // out
 {
-    rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 
     assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n");
@@ -455,5 +497,7 @@
     *error     = (error_t)rpc.args[4];
 
-    rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 }
 
@@ -466,5 +510,7 @@
     error_t          error;    
 
-    rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 
     // get client cluster identifier and pointer on RPC descriptor
@@ -488,5 +534,7 @@
     hal_remote_swd( XPTR( client_cxy , &desc->args[2] ) , (uint64_t)thread_xp );
 
-    rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 }
 
@@ -500,5 +548,7 @@
                              uint32_t    sig_id )    // in
 {
-    rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 
     assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n");
@@ -516,5 +566,7 @@
     rpc_send_sync( cxy , &rpc );
 
-    rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 }
 
@@ -525,5 +577,7 @@
     uint32_t     sig_id;   // signal index
 
-    rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 
     // get client cluster identifier and pointer on RPC descriptor
@@ -538,5 +592,7 @@
     signal_rise( process , sig_id );
 
-    rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 }
 
@@ -558,5 +614,7 @@
                                   error_t      * error )     // out
 {
-    rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 
     assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n");
@@ -584,5 +642,7 @@
     *error    = (error_t)rpc.args[9];
 
-    rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 }
 
@@ -601,5 +661,7 @@
     error_t          error;
 
-    rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 
     // get client cluster identifier and pointer on RPC descriptor
@@ -632,5 +694,7 @@
     hal_remote_swd( XPTR( client_cxy , &desc->args[9] ) , (uint64_t)error );
 
-    rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 }
 
@@ -643,5 +707,7 @@
                                    struct vfs_inode_s * inode )
 {
-    rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 
     assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n");
@@ -658,5 +724,7 @@
     rpc_send_sync( cxy , &rpc );
 
-    rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 }
 
@@ -666,5 +734,7 @@
     vfs_inode_t * inode;
 
-    rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 
     // get client cluster identifier and pointer on RPC descriptor
@@ -678,5 +748,7 @@
     vfs_inode_destroy( inode );
 
-    rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 }
 
@@ -693,5 +765,7 @@
                                    error_t              * error )       // out
 {
-    rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 
     assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n");
@@ -714,5 +788,7 @@
     *error     = (error_t)rpc.args[4];
 
-    rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 }
 
@@ -728,5 +804,7 @@
     char          name_copy[CONFIG_VFS_MAX_NAME_LENGTH];
 
-    rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 
     // get client cluster identifier and pointer on RPC descriptor
@@ -752,5 +830,7 @@
     hal_remote_swd( XPTR( client_cxy , &desc->args[4] ) , (uint64_t)error );
 
-    rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 }
 
@@ -764,5 +844,7 @@
                                     vfs_dentry_t * dentry )
 {
-    rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 
     assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n");
@@ -779,5 +861,7 @@
     rpc_send_sync( cxy , &rpc );
 
-    rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 }
 
@@ -787,5 +871,7 @@
     vfs_dentry_t * dentry;
 
-    rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 
     // get client cluster identifier and pointer on RPC descriptor
@@ -799,5 +885,7 @@
     vfs_dentry_destroy( dentry );
 
-    rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 }
 
@@ -814,5 +902,7 @@
                                  error_t              * error )      // out
 {
-    rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 
     assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n");
@@ -834,5 +924,7 @@
     *error   = (error_t)rpc.args[3];
 
-    rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 }
 
@@ -845,5 +937,7 @@
     error_t       error;
 
-    rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 
     // get client cluster identifier and pointer on RPC descriptor
@@ -864,5 +958,7 @@
     hal_remote_swd( XPTR( client_cxy , &desc->args[3] ) , (uint64_t)error );
 
-    rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 }
 
@@ -875,5 +971,7 @@
                                   vfs_file_t * file )
 {
-    rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 
     assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n");
@@ -890,5 +988,7 @@
     rpc_send_sync( cxy , &rpc );
 
-    rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 }
 
@@ -898,5 +998,7 @@
     vfs_file_t * file;
 
-    rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 
     // get client cluster identifier and pointer on RPC descriptor
@@ -910,5 +1012,7 @@
     vfs_file_destroy( file );
 
-    rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 }
 
@@ -924,5 +1028,7 @@
                                 error_t     * error )          // out
 {
-    rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 
     assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n");
@@ -944,5 +1050,7 @@
     *error   = (error_t)rpc.args[3];
 
-    rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 }
 
@@ -957,5 +1065,7 @@
     char          name_copy[CONFIG_VFS_MAX_NAME_LENGTH];
 
-    rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 
     // get client cluster identifier and pointer on RPC descriptor
@@ -978,5 +1088,7 @@
     hal_remote_swd( XPTR( client_cxy , &desc->args[3] ) , (uint64_t)error );
 
-    rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 }
 
@@ -990,5 +1102,7 @@
                                      error_t     * error )     // out
 {
-    rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 
     assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n");
@@ -1008,5 +1122,7 @@
     *error   = (error_t)rpc.args[1];
 
-    rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 }
 
@@ -1017,5 +1133,7 @@
     vfs_inode_t * inode;
 
-    rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 
     // get client cluster identifier and pointer on RPC descriptor
@@ -1032,5 +1150,7 @@
     hal_remote_swd( XPTR( client_cxy , &desc->args[3] ) , (uint64_t)error );
 
-    rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 }
 
@@ -1047,5 +1167,7 @@
                                    error_t  * error )    // out
 {
-    rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 
     assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n");
@@ -1068,5 +1190,7 @@
     *error   = (error_t)rpc.args[4];
 
-    rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 }
 
@@ -1080,5 +1204,7 @@
     error_t       error;
 
-    rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 
     // get client cluster identifier and pointer on RPC descriptor
@@ -1098,5 +1224,7 @@
     hal_remote_swd( XPTR( client_cxy , &desc->args[4] ) , (uint64_t)error );
 
-    rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 }
 
@@ -1111,5 +1239,7 @@
                                   xptr_t    * vseg_xp )    // out
 {
-    rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 
     assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n");
@@ -1130,5 +1260,7 @@
     *vseg_xp = rpc.args[2];
 
-    rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 }
 
@@ -1141,5 +1273,7 @@
     xptr_t        vseg_xp;
 
-    rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 
     // get client cluster identifier and pointer on RPC descriptor
@@ -1159,5 +1293,7 @@
     hal_remote_swd( XPTR( client_cxy , &desc->args[2] ) , (uint64_t)vseg_xp );
 
-    rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 }
 
@@ -1175,5 +1311,7 @@
                              error_t   * error )   // out 
 {
-    rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 
     assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n");
@@ -1196,5 +1334,7 @@
     *error = (error_t)rpc.args[4];
 
-    rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 }
 
@@ -1208,5 +1348,7 @@
     error_t       error;
 
-    rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 
     // get client cluster identifier and pointer on RPC descriptor
@@ -1226,5 +1368,7 @@
     hal_remote_swd( XPTR( client_cxy , &desc->args[4] ) , (uint64_t)error );
 
-    rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 }
 
@@ -1238,5 +1382,7 @@
                            xptr_t *   buf_xp )     // out
 {
-    rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 
     assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n");
@@ -1256,5 +1402,7 @@
     *buf_xp = (xptr_t)rpc.args[1];
 
-    rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 }
 
@@ -1262,5 +1410,7 @@
 void rpc_kcm_alloc_server( xptr_t xp )
 {
-    rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 
     // get client cluster identifier and pointer on RPC descriptor
@@ -1281,5 +1431,7 @@
     hal_remote_swd( XPTR( client_cxy , &desc->args[1] ) , (uint64_t)buf_xp );
 
-    rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 }   
 
@@ -1293,5 +1445,7 @@
                           uint32_t   kmem_type )   // in
 {
-    rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 
     assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n");
@@ -1309,5 +1463,7 @@
     rpc_send_sync( cxy , &rpc );
 
-    rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 }
 
@@ -1315,5 +1471,7 @@
 void rpc_kcm_free_server( xptr_t xp )
 {
-    rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 
     // get client cluster identifier and pointer on RPC descriptor
@@ -1331,5 +1489,7 @@
     kmem_free( &req );
 
-    rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 }   
 
@@ -1348,5 +1508,7 @@
                                     error_t  * error )        // out
 {
-    rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 
     assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n");
@@ -1371,5 +1533,7 @@
     *error     = (error_t)rpc.args[6];
 
-    rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 }
 
@@ -1386,5 +1550,7 @@
     error_t    error;
 
-    rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 
     // get client cluster identifier and pointer on RPC descriptor
@@ -1424,5 +1590,7 @@
     hal_remote_swd( XPTR( client_cxy , &desc->args[6] ) , (uint64_t)error );
 
-    rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 }
 
@@ -1437,5 +1605,7 @@
                                  page_t         ** page )      // out
 {
-    rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 
     assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n");
@@ -1456,5 +1626,7 @@
     *page = (page_t *)(intptr_t)rpc.args[2];
 
-    rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 }
 
@@ -1462,5 +1634,7 @@
 void rpc_mapper_get_page_server( xptr_t xp )
 {
-    rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 
     // get client cluster identifier and pointer on RPC descriptor
@@ -1478,5 +1652,7 @@
     hal_remote_swd( XPTR( cxy , &desc->args[1] ) , (uint64_t)(intptr_t)page );
 
-    rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
+    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
+    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy, 
+    CURRENT_THREAD->core->lid , hal_time_stamp() );
 }
 
@@ -1495,7 +1671,5 @@
     reg_t      sr_save;
 
-    thread_t * this = CURRENT_THREAD;
-
-    rpc_dmsg("\n[INFO] %s : enter / client_cxy = %x / server_cxy = %x / cycle %d\n",
+    rpcg_dmsg("\n[INFO] %s : enter / client_cxy = %x / server_cxy = %x / cycle %d\n",
     __FUNCTION__ , local_cxy , server_cxy , hal_time_stamp() );
 
@@ -1514,5 +1688,4 @@
                                       (uint64_t )desc_xp,
                                       &first );
-
 	    if ( error ) 
         {
@@ -1525,5 +1698,5 @@
     while( error );
  
-    rpc_dmsg("\n[INFO] %s : RPC %l registered / server_cxy = %x / cycle %d\n",
+    rpcg_dmsg("\n[INFO] %s : RPC %l registered / server_cxy = %x / cycle %d\n",
     __FUNCTION__ , desc_xp , server_cxy , hal_time_stamp() );
 	
@@ -1539,5 +1712,5 @@
 		    dev_pic_send_ipi( server_cxy , 0 );
 
-		    rpc_dmsg("\n[INFO] %s : IPI sent / client_cxy = %x / server_cxy = %x\n",
+		    rpcg_dmsg("\n[INFO] %s : IPI sent / client_cxy = %x / server_cxy = %x\n",
             __FUNCTION__, local_cxy , server_cxy );
         }
@@ -1545,17 +1718,14 @@
 
 	// enable IRQs to allow incoming RPC and avoid deadlock
-	if( this->type == THREAD_RPC ) hal_enable_irq( &sr_save );
+	hal_enable_irq( &sr_save );
 
     // the server thread poll the response slot until RPC completed
     // TODO this could be replaced by a descheduling policy... [AG]
-	while( 1 )
-    {
-        if( rpc->response == 0 ) break;
-    }
+    while( rpc->response ) asm volatile( "nop" );
 
     // restore IRQs
-	if( this->type == THREAD_RPC ) hal_restore_irq( sr_save );
-
-    rpc_dmsg("\n[INFO] %s : completed / client_cxy = %x / server_cxy = %x / cycle %d\n",
+	hal_restore_irq( sr_save );
+
+    rpcg_dmsg("\n[INFO] %s : completed / client_cxy = %x / server_cxy = %x / cycle %d\n",
     __FUNCTION__ , local_cxy , server_cxy , hal_time_stamp() );
 
@@ -1592,5 +1762,5 @@
 	count = 0;
 
-    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / fifo = %x / cycle %d\n",
+    rpcg_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
     __FUNCTION__, this->trdid, local_cxy, core->lid , hal_time_stamp() );
  
@@ -1609,6 +1779,6 @@
 	        index = hal_remote_lw( XPTR( client_cxy , &desc->index ) );
 
-            rpc_dmsg("\n[INFO] %s : thread %x on core [%x,%d] / index = %d / &rpc = %x\n",
-		     __FUNCTION__ , this->trdid , core->lid , local_cxy , index , rpc_server[index] );
+            rpcg_dmsg("\n[INFO] %s : thread %x on core [%x,%d] / rpc = %d\n",
+		     __FUNCTION__ , this->trdid , core->lid , local_cxy , index );
 
             // call the relevant server function
@@ -1619,5 +1789,5 @@
 
             // notify RPC completion as required
-            hal_remote_atomic_add( XPTR(client_cxy,&desc->response) , -1 );
+            hal_remote_atomic_add( XPTR( client_cxy , &desc->response ) , -1 );
 		}
 	
@@ -1678,5 +1848,5 @@
         thread->blocked = 0;
 
-        rpc_dmsg("\n[INFO] %s : activate RPC thread %x on core [%x,%d] / cycle %d\n", 
+        rpcg_dmsg("\n[INFO] %s : activate RPC thread %x on core [%x,%d] / cycle %d\n", 
 		          __FUNCTION__ , thread , core->gid , local_cxy , hal_time_stamp() );
     }
@@ -1703,5 +1873,5 @@
 	    hal_atomic_add( &LOCAL_CLUSTER->rpc_threads , 1 );
 
-        rpc_dmsg("\n[INFO] %s : create RPC thread %x on core [%x,%d] / cycle %d\n", 
+        rpcg_dmsg("\n[INFO] %s : create RPC thread %x on core [%x,%d] / cycle %d\n", 
 		          __FUNCTION__ , thread->trdid, local_cxy, core->lid, hal_time_stamp() );
     }
@@ -1728,12 +1898,12 @@
     error_t      error;
 
-    rpc_dmsg("\n[INFO] %s : enter in cluster %x\n",
-             __FUNCTION__ , local_cxy );
+    rpcg_dmsg("\n[INFO] %s : enter / thread %x / cluster %x / cycle %d\n",
+             __FUNCTION__ , this->trdid , local_cxy , hal_time_stamp() );
 
     // calling thread does nothing if light lock already taken or FIFO empty  
 	if( (rpc_fifo->owner != 0) || (local_fifo_is_empty( &rpc_fifo->fifo )) )
     {
-        rpc_dmsg("\n[INFO] %s : exit but do nothing in cluster %x\n",
-                 __FUNCTION__ , local_cxy );
+        rpcg_dmsg("\n[INFO] %s : exit do nothing / thread %x / cluster %x / cycle %d\n",
+                 __FUNCTION__ , this->trdid , local_cxy , hal_time_stamp() );
 
         return false;
@@ -1754,6 +1924,7 @@
         }
 
-        rpc_dmsg("\n[INFO] %s : exit after activating an RPC thread in cluster %x\n",
-                 __FUNCTION__ , local_cxy );
+        rpcg_dmsg("\n[INFO] %s : exit after RPC thread activation / "
+                 "thread %x / cluster %x / cycle %d\n",
+                 __FUNCTION__ , this->trdid , local_cxy , hal_time_stamp() );
 
         return true;
@@ -1761,6 +1932,6 @@
     else  // light lock taken by another thread
     {
-        rpc_dmsg("\n[INFO] %s : exit but do nothing in cluster %x\n",
-                 __FUNCTION__ , local_cxy );
+        rpcg_dmsg("\n[INFO] %s : exit do nothing / thread %x / cluster %x / cycle %d\n",
+                 __FUNCTION__ , this->trdid , local_cxy , hal_time_stamp() );
 
         return false;
@@ -1778,5 +1949,5 @@
 	rpc_fifo_t * rpc_fifo = &LOCAL_CLUSTER->rpc_fifo;
 
-    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
+    rpcg_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
              __FUNCTION__, this->trdid, local_cxy, this->core->lid, hal_time_stamp() );
 
@@ -1803,5 +1974,5 @@
 		if( LOCAL_CLUSTER->rpc_threads >= CONFIG_RPC_THREADS_MAX ) 
 		{
-            rpc_dmsg("\n[INFO] thread %x on core[%x,%d] suicide / cycle %d\n", 
+            rpcg_dmsg("\n[INFO] %s : RPC thread %x on core[%x,%d] suicide / cycle %d\n", 
 		    __FUNCTION__, this->trdid, local_cxy, this->core->lid, hal_time_stamp() );
 
@@ -1814,5 +1985,5 @@
         else
         {
-            rpc_dmsg("\n[INFO] %s : thread %x on core[%x,%d] blocks / cycle %d\n", 
+            rpcg_dmsg("\n[INFO] %s : RPC thread %x on core[%x,%d] blocks / cycle %d\n", 
 			__FUNCTION__, this->trdid, local_cxy, this->core->lid, hal_time_stamp() ); 
 
@@ -1820,5 +1991,5 @@
             sched_yield( NULL );
 
-		    rpc_dmsg("\n[INFO] RPC thread %x wake up on core[%x,%d] / cycle %d\n", 
+		    rpcg_dmsg("\n[INFO] %s : RPC thread %x wake up on core[%x,%d] / cycle %d\n", 
 	        __FUNCTION__, this->trdid, local_cxy, this->core->lid, hal_time_stamp() );
         }
