Index: trunk/kernel/kern/process.c
===================================================================
--- trunk/kernel/kern/process.c	(revision 583)
+++ trunk/kernel/kern/process.c	(revision 593)
@@ -123,5 +123,5 @@
 uint32_t cycle = (uint32_t)hal_get_cycles();
 if( DEBUG_PROCESS_REFERENCE_INIT )
-printk("\n[DBG] %s : thread %x in process %x enter to initalialize process %x / cycle %d\n",
+printk("\n[%s] thread %x in process %x enter to initalialize process %x / cycle %d\n",
 __FUNCTION__, CURRENT_THREAD->trdid, parent_pid , pid , cycle );
 #endif
@@ -142,5 +142,5 @@
 cycle = (uint32_t)hal_get_cycles();
 if( DEBUG_PROCESS_REFERENCE_INIT )
-printk("\n[DBG] %s : thread %x in process %x / vmm empty for process %x / cycle %d\n", 
+printk("\n[%s] thread %x in process %x / vmm empty for process %x / cycle %d\n", 
 __FUNCTION__, CURRENT_THREAD->trdid, parent_pid , pid, cycle );
 #endif
@@ -162,5 +162,5 @@
 cycle = (uint32_t)hal_get_cycles();
 if( DEBUG_PROCESS_REFERENCE_INIT )
-printk("\n[DBG] %s : thread %x in process %x / process %x attached to TXT%d / cycle %d\n", 
+printk("\n[%s] thread %x in process %x / process %x attached to TXT%d / cycle %d\n", 
 __FUNCTION__, CURRENT_THREAD->trdid, parent_pid, pid, txt_id, cycle );
 #endif
@@ -183,5 +183,5 @@
 cycle = (uint32_t)hal_get_cycles();
 if( DEBUG_PROCESS_REFERENCE_INIT )
-printk("\n[DBG] %s : thread %x in process %x / stdin open for process %x / cycle %d\n", 
+printk("\n[%s] thread %x in process %x / stdin open for process %x / cycle %d\n", 
 __FUNCTION__, CURRENT_THREAD->trdid, parent_pid, pid, cycle );
 #endif
@@ -201,5 +201,5 @@
 cycle = (uint32_t)hal_get_cycles();
 if( DEBUG_PROCESS_REFERENCE_INIT )
-printk("\n[DBG] %s : thread %x in process %x / stdout open for process %x / cycle %d\n", 
+printk("\n[%s] thread %x in process %x / stdout open for process %x / cycle %d\n", 
 __FUNCTION__, CURRENT_THREAD->trdid, parent_pid, pid, cycle );
 #endif
@@ -219,5 +219,5 @@
 cycle = (uint32_t)hal_get_cycles();
 if( DEBUG_PROCESS_REFERENCE_INIT )
-printk("\n[DBG] %s : thread %x in process %x / stderr open for process %x / cycle %d\n", 
+printk("\n[%s] thread %x in process %x / stderr open for process %x / cycle %d\n", 
 __FUNCTION__, CURRENT_THREAD->trdid, parent_pid, pid, cycle );
 #endif
@@ -260,5 +260,5 @@
 cycle = (uint32_t)hal_get_cycles();
 if( DEBUG_PROCESS_REFERENCE_INIT )
-printk("\n[DBG] %s : thread %x in process %x / set fd_array for process %x / cycle %d\n", 
+printk("\n[%s] thread %x in process %x / set fd_array for process %x / cycle %d\n", 
 __FUNCTION__, CURRENT_THREAD->trdid, parent_pid, pid , cycle );
 #endif
@@ -301,5 +301,5 @@
 cycle = (uint32_t)hal_get_cycles();
 if( DEBUG_PROCESS_REFERENCE_INIT )
-printk("\n[DBG] %s : thread %x in process %x exit for process %x / cycle %d\n", 
+printk("\n[%s] thread %x in process %x exit for process %x / cycle %d\n", 
 __FUNCTION__, CURRENT_THREAD->trdid, parent_pid, pid, cycle );
 #endif
@@ -328,5 +328,5 @@
 uint32_t cycle = (uint32_t)hal_get_cycles();
 if( DEBUG_PROCESS_COPY_INIT )
-printk("\n[DBG] %s : thread %x in process %x enter for process %x / cycle %d\n",
+printk("\n[%s] thread %x in process %x enter for process %x / cycle %d\n",
 __FUNCTION__, this->trdid, this->process->pid, local_process->pid, cycle );
 #endif
@@ -383,5 +383,5 @@
 cycle = (uint32_t)hal_get_cycles();
 if( DEBUG_PROCESS_COPY_INIT )
-printk("\n[DBG] %s : thread %x in process %x exit for process %x / cycle %d\n",
+printk("\n[%s] thread %x in process %x exit for process %x / cycle %d\n",
 __FUNCTION__, this->trdid, this->process->pid, local_process->pid, cycle );
 #endif
@@ -402,11 +402,11 @@
     pid_t       pid = process->pid;
 
-	assert( (process->th_nr == 0) ,
-    "process %x in cluster %x has still active threads", pid , local_cxy );
+// check no more threads
+assert( (process->th_nr == 0) , "process %x in cluster %x contains threads", pid , local_cxy );
 
 #if DEBUG_PROCESS_DESTROY
 uint32_t cycle = (uint32_t)hal_get_cycles();
 if( DEBUG_PROCESS_DESTROY )
-printk("\n[DBG] %s : thread %x in process %x enter for process %x in cluster %x / cycle %d\n",
+printk("\n[%s] thread %x in process %x enter for process %x in cluster %x / cycle %d\n",
 __FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid, pid, local_cxy, cycle );
 #endif
@@ -457,5 +457,5 @@
 cycle = (uint32_t)hal_get_cycles();
 if( DEBUG_PROCESS_DESTROY )
-printk("\n[DBG] %s : thread %x in process %x exit / process %x in cluster %x / cycle %d\n",
+printk("\n[%s] thread %x in process %x exit / process %x in cluster %x / cycle %d\n",
 __FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid, pid, local_cxy, cycle );
 #endif
@@ -506,5 +506,5 @@
 uint32_t cycle = (uint32_t)hal_get_cycles();
 if( DEBUG_PROCESS_SIGACTION < cycle )
-printk("\n[DBG] %s : thread[%x,%x] enter to %s process %x / cycle %d\n",
+printk("\n[%s] thread[%x,%x] enter to %s process %x / cycle %d\n",
 __FUNCTION__ , client->process->pid, client->trdid,
 process_action_str( type ) , pid , cycle );
@@ -518,5 +518,5 @@
     lpid      = LPID_FROM_PID( pid );
 
-    // get root of list of copies, lock, and number of copies from owner cluster
+    // get root of list of copies and lock from owner cluster
     root_xp   = XPTR( owner_cxy , &cluster->pmgr.copies_root[lpid] );
     lock_xp   = XPTR( owner_cxy , &cluster->pmgr.copies_lock[lpid] );
@@ -527,5 +527,5 @@
          (type == UNBLOCK_ALL_THREADS )), "illegal action type" );
              
-    // The client thread send parallel RPCs to all remote clusters containing
+    // This client thread send parallel RPCs to all remote clusters containing
     // target process copies, wait all responses, and then handles directly 
     // the threads in local cluster, when required.
@@ -561,9 +561,12 @@
         process_ptr = GET_PTR( process_xp );
 
-        if( process_cxy == local_cxy )    // process is local
+// printk("\n@@@ in %s : process_cxy %x / process_ptr %x / pid %x\n", 
+// __FUNCTION__, process_cxy, process_ptr, hal_remote_l32( XPTR( process_cxy , &process_ptr->pid ) ) );
+
+        if( process_cxy == local_cxy )    // process copy is local
         { 
             local = process_ptr;
         }
-        else                              // process is remote
+        else                              // process copy is remote
         {
             // update number of remote process copies
@@ -575,5 +578,5 @@
 #if DEBUG_PROCESS_SIGACTION 
 if( DEBUG_PROCESS_SIGACTION < cycle )
-printk("\n[DBG] %s : thread[%x,%x] send RPC to cluster %x for process %x\n",
+printk("\n[%s] thread[%x,%x] send RPC to cluster %x for process %x\n",
 __FUNCTION__, client->process->pid, client->trdid, process_cxy, pid );
 #endif
@@ -607,5 +610,5 @@
 #if DEBUG_PROCESS_SIGACTION 
 if( DEBUG_PROCESS_SIGACTION < cycle )
-printk("\n[DBG] %s : thread[%x,%x] handles local process %x in cluster %x\n",
+printk("\n[%s] thread[%x,%x] handles local process %x in cluster %x\n",
 __FUNCTION__, client->process->pid, client->trdid, pid , local_cxy );
 #endif
@@ -618,5 +621,5 @@
 cycle = (uint32_t)hal_get_cycles();
 if( DEBUG_PROCESS_SIGACTION < cycle )
-printk("\n[DBG] %s : thread[%x,%x] exit after %s process %x / cycle %d\n",
+printk("\n[%s] thread[%x,%x] exit after %s process %x / cycle %d\n",
 __FUNCTION__, client->process->pid, client->trdid,
 process_action_str( type ), pid, cycle );
@@ -633,5 +636,5 @@
     cxy_t               owner_cxy;      // target process owner cluster
     uint32_t            count;          // requests counter
-    volatile uint32_t   ack_count;      // scheduler acknowledge counter
+    volatile uint32_t   ack_count;      // acknowledges counter
 
     // get calling thread pointer
@@ -642,5 +645,5 @@
 uint32_t cycle = (uint32_t)hal_get_cycles();
 if( DEBUG_PROCESS_SIGACTION < cycle )
-printk("\n[DBG] %s : thread[%x,%x] enter for process %x in cluster %x / cycle %d\n",
+printk("\n[%s] thread[%x,%x] enter for process %x in cluster %x / cycle %d\n",
 __FUNCTION__, this->process->pid, this->trdid, pid, local_cxy , cycle );
 #endif
@@ -657,4 +660,10 @@
     // loop on target process local threads 
     // we use both "ltid" and "count" because it can exist "holes" in th_tbl
+    // - if the calling thread and the target thread are not running on the same
+    //   core, we ask the target scheduler to acknowlege the blocking
+    //   to be sure that the target thread is not running.
+    // - if the calling thread and the target thread are running on the same core,
+    //   we don't need confirmation from scheduler.
+            
     for( ltid = 0 , count = 0 , ack_count = 0 ; count < process->th_nr ; ltid++ )
     {
@@ -668,10 +677,4 @@
             thread_block( XPTR( local_cxy , target ) , THREAD_BLOCKED_GLOBAL );
   
-            // - if the calling thread and the target thread are running on the same core,
-            //   we don't need confirmation from scheduler,
-            // - if the calling thread and the target thread are not running on the same
-            //   core, we ask the target scheduler to acknowlege the blocking
-            //   to be sure that the target thread is not running.
-            
             if( this->core->lid != target->core->lid )
             {
@@ -691,6 +694,5 @@
     rwlock_rd_release( &process->th_lock );
 
-    // busy waiting acknowledges 
-    // TODO this could be improved...
+    // wait other threads acknowledges  TODO this could be improved...
     while( 1 )
     {
@@ -705,6 +707,6 @@
 cycle = (uint32_t)hal_get_cycles();
 if( DEBUG_PROCESS_SIGACTION < cycle )
-printk("\n[DBG] %s : thread[%x,%x] exit for process %x in cluster %x / cycle %d\n",
-__FUNCTION__, this, this->process->pid, pid, local_cxy , cycle );
+printk("\n[%s] thread[%x,%x] exit for process %x in cluster %x / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, pid, local_cxy , cycle );
 #endif
 
@@ -729,14 +731,12 @@
 
 #if DEBUG_PROCESS_SIGACTION
-pid_t pid = process->pid;
 uint32_t cycle = (uint32_t)hal_get_cycles();
 if( DEBUG_PROCESS_SIGACTION < cycle )
-printk("\n[DBG] %s : thread[%x,%x] enter in cluster %x for process %x / cycle %d\n",
+printk("\n[%s] thread[%x,%x] enter in cluster %x for process %x / cycle %d\n",
 __FUNCTION__, this->process->pid, this->trdid, local_cxy, process->pid, cycle );
 #endif
 
 // check target process is an user process
-assert( ( LPID_FROM_PID( process->pid ) != 0 ),
-"target process must be an user process" );
+assert( (LPID_FROM_PID( process->pid ) != 0), "process %x not an user process", process->pid );
 
     // get lock protecting process th_tbl[]
@@ -770,6 +770,6 @@
 cycle = (uint32_t)hal_get_cycles();
 if( DEBUG_PROCESS_SIGACTION < cycle )
-printk("\n[DBG] %s : thread[%x,%x] exit for process %x in cluster %x / cycle %d\n",
-__FUNCTION__, this->process->pid, this->trdid, pid, local_cxy , cycle );
+printk("\n[%s] thread[%x,%x] exit for process %x in cluster %x / cycle %d\n",
+__FUNCTION__, this->process->pid, this->trdid, process->pid, local_cxy , cycle );
 #endif
 
@@ -791,5 +791,5 @@
 uint32_t cycle = (uint32_t)hal_get_cycles();
 if( DEBUG_PROCESS_SIGACTION < cycle )
-printk("\n[DBG] %s : thread[%x,%x] enter for process %x in cluster %x / cycle %d\n",
+printk("\n[%s] thread[%x,%x] enter for process %x in cluster %x / cycle %d\n",
 __FUNCTION__, this->process->pid, this->trdid, pid, local_cxy , cycle );
 #endif
@@ -823,5 +823,5 @@
 cycle = (uint32_t)hal_get_cycles();
 if( DEBUG_PROCESS_SIGACTION < cycle )
-printk("\n[DBG] %s : thread[%x,%x] exit for process %x in cluster %x / cycle %d\n",
+printk("\n[%s] thread[%x,%x] exit for process %x in cluster %x / cycle %d\n",
 __FUNCTION__, this->process->pid, this->trdid, pid, local_cxy, cycle );
 #endif
@@ -842,5 +842,5 @@
 uint32_t cycle = (uint32_t)hal_get_cycles();
 if( DEBUG_PROCESS_GET_LOCAL_COPY < cycle )
-printk("\n[DBG] %s : thread[%x,%x] enter for process %x in cluster %x / cycle %d\n",
+printk("\n[%s] thread[%x,%x] enter for process %x in cluster %x / cycle %d\n",
 __FUNCTION__, this->process->pid, this->trdid, pid, local_cxy, cycle );
 #endif
@@ -889,5 +889,5 @@
 cycle = (uint32_t)hal_get_cycles();
 if( DEBUG_PROCESS_GET_LOCAL_COPY < cycle )
-printk("\n[DBG] %s : thread[%x,%x] exit in cluster %x / process %x / cycle %d\n",
+printk("\n[%s] thread[%x,%x] exit in cluster %x / process %x / cycle %d\n",
 __FUNCTION__, this->process->pid, this->trdid, local_cxy, process_ptr, cycle );
 #endif
@@ -1205,5 +1205,5 @@
 pid_t      pid   = this->process->pid;
 if( DEBUG_PROCESS_MAKE_FORK < cycle )
-printk("\n[DBG] %s : thread[%x,%x] enter / cluster %x / cycle %d\n",
+printk("\n[%s] thread[%x,%x] enter / cluster %x / cycle %d\n",
 __FUNCTION__, pid, trdid, local_cxy, cycle );
 #endif
@@ -1231,5 +1231,5 @@
 cycle = (uint32_t)hal_get_cycles();
 if( DEBUG_PROCESS_MAKE_FORK < cycle )
-printk("\n[DBG] %s : thread[%x,%x] allocated process %x / cycle %d\n",
+printk("\n[%s] thread[%x,%x] allocated process %x / cycle %d\n",
 __FUNCTION__, pid, trdid, new_pid, cycle );
 #endif
@@ -1243,5 +1243,5 @@
 cycle = (uint32_t)hal_get_cycles();
 if( DEBUG_PROCESS_MAKE_FORK < cycle )
-printk("\n[DBG] %s : thread[%x,%x] initialized child_process %x / cycle %d\n",
+printk("\n[%s] thread[%x,%x] initialized child_process %x / cycle %d\n",
 __FUNCTION__, pid, trdid, new_pid, cycle );
 #endif
@@ -1263,5 +1263,5 @@
 cycle = (uint32_t)hal_get_cycles();
 if( DEBUG_PROCESS_MAKE_FORK < cycle )
-printk("\n[DBG] %s : thread[%x,%x] copied VMM from parent to child / cycle %d\n",
+printk("\n[%s] thread[%x,%x] copied VMM from parent to child / cycle %d\n",
 __FUNCTION__, pid, trdid, cycle );
 #endif
@@ -1276,5 +1276,5 @@
 cycle = (uint32_t)hal_get_cycles();
 if( DEBUG_PROCESS_MAKE_EXEC < cycle )
-printk("\n[DBG] %s : thread[%x,%x] / child takes TXT ownership / cycle %d\n",
+printk("\n[%s] thread[%x,%x] / child takes TXT ownership / cycle %d\n",
 __FUNCTION__ , pid, trdid, cycle );
 #endif
@@ -1305,5 +1305,5 @@
 cycle = (uint32_t)hal_get_cycles();
 if( DEBUG_PROCESS_MAKE_FORK < cycle )
-printk("\n[DBG] %s : thread[%x,%x] created main thread %x / cycle %d\n", 
+printk("\n[%s] thread[%x,%x] created main thread %x / cycle %d\n", 
 __FUNCTION__, pid, trdid, thread, cycle );
 #endif
@@ -1327,5 +1327,5 @@
 cycle = (uint32_t)hal_get_cycles();
 if( DEBUG_PROCESS_MAKE_FORK < cycle )
-printk("\n[DBG] %s : thread[%x,%x] set COW in parent and child / cycle %d\n",
+printk("\n[%s] thread[%x,%x] set COW in parent and child / cycle %d\n",
 __FUNCTION__, pid, trdid, cycle );
 #endif
@@ -1349,5 +1349,5 @@
 cycle = (uint32_t)hal_get_cycles();
 if( DEBUG_PROCESS_MAKE_FORK < cycle )
-printk("\n[DBG] %s : thread[%x,%x] exit / created process %x / cycle %d\n",
+printk("\n[%s] thread[%x,%x] exit / created process %x / cycle %d\n",
 __FUNCTION__, pid, trdid, new_pid, cycle );
 #endif
@@ -1383,5 +1383,5 @@
 uint32_t cycle = (uint32_t)hal_get_cycles();
 if( DEBUG_PROCESS_MAKE_EXEC < cycle )
-printk("\n[DBG] %s : thread[%x,%x] enters for %s / cycle %d\n",
+printk("\n[%s] thread[%x,%x] enters for %s / cycle %d\n",
 __FUNCTION__, pid, thread->trdid, path, cycle );
 #endif
@@ -1405,5 +1405,5 @@
 cycle = (uint32_t)hal_get_cycles();
 if( DEBUG_PROCESS_MAKE_EXEC < cycle )
-printk("\n[DBG] %s : thread[%x,%x] opened file <%s> / cycle %d\n",
+printk("\n[%s] thread[%x,%x] opened file <%s> / cycle %d\n",
 __FUNCTION__, pid, thread->trdid, path, cycle );
 #endif
@@ -1415,5 +1415,5 @@
 cycle = (uint32_t)hal_get_cycles();
 if( DEBUG_PROCESS_MAKE_EXEC < cycle )
-printk("\n[DBG] %s : thread[%x,%x] deleted all threads / cycle %d\n",
+printk("\n[%s] thread[%x,%x] deleted all threads / cycle %d\n",
 __FUNCTION__, pid, thread->trdid, cycle );
 #endif
@@ -1425,5 +1425,5 @@
 cycle = (uint32_t)hal_get_cycles();
 if( DEBUG_PROCESS_MAKE_EXEC < cycle )
-printk("\n[DBG] %s : thread[%x,%x] reset VMM / cycle %d\n",
+printk("\n[%s] thread[%x,%x] reset VMM / cycle %d\n",
 __FUNCTION__, pid, thread->trdid, cycle );
 #endif
@@ -1442,5 +1442,5 @@
 cycle = (uint32_t)hal_get_cycles();
 if( DEBUG_PROCESS_MAKE_EXEC < cycle )
-printk("\n[DBG] %s : thread[%x,%x] / kentry/args/envs vsegs registered / cycle %d\n",
+printk("\n[%s] thread[%x,%x] / kentry/args/envs vsegs registered / cycle %d\n",
 __FUNCTION__, pid, thread->trdid, cycle );
 #endif
@@ -1460,5 +1460,5 @@
 cycle = (uint32_t)hal_get_cycles();
 if( DEBUG_PROCESS_MAKE_EXEC < cycle )
-printk("\n[DBG] %s : thread[%x,%x] / code/data vsegs registered / cycle %d\n",
+printk("\n[%s] thread[%x,%x] / code/data vsegs registered / cycle %d\n",
 __FUNCTION__, pid, thread->trdid, cycle );
 #endif
@@ -1492,5 +1492,5 @@
 uint32_t cycle = (uint32_t)hal_get_cycles();
 if( DEBUG_PROCESS_ZERO_CREATE < cycle )
-printk("\n[DBG] %s : enter / cluster %x / cycle %d\n",
+printk("\n[%s] enter / cluster %x / cycle %d\n",
 __FUNCTION__, local_cxy, cycle );
 #endif
@@ -1539,5 +1539,5 @@
 cycle = (uint32_t)hal_get_cycles();
 if( DEBUG_PROCESS_ZERO_CREATE < cycle )
-printk("\n[DBG] %s : exit / cluster %x / cycle %d\n",
+printk("\n[%s] exit / cluster %x / cycle %d\n",
 __FUNCTION__, local_cxy, cycle );
 #endif
@@ -1560,5 +1560,5 @@
 uint32_t cycle = (uint32_t)hal_get_cycles();
 if( DEBUG_PROCESS_INIT_CREATE < cycle )
-printk("\n[DBG] %s : thread %x in process %x enter / cycle %d\n",
+printk("\n[%s] thread %x in process %x enter / cycle %d\n",
 __FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid, cycle );
 #endif
@@ -1589,5 +1589,5 @@
 #if(DEBUG_PROCESS_INIT_CREATE & 1)
 if( DEBUG_PROCESS_INIT_CREATE < cycle )
-printk("\n[DBG] %s : thread %x in process %x initialized process descriptor\n",
+printk("\n[%s] thread %x in process %x initialized process descriptor\n",
 __FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid );
 #endif
@@ -1608,5 +1608,5 @@
 #if(DEBUG_PROCESS_INIT_CREATE & 1)
 if( DEBUG_PROCESS_INIT_CREATE < cycle )
-printk("\n[DBG] %s : thread %x in process %x open .elf file decriptor\n",
+printk("\n[%s] thread %x in process %x open .elf file decriptor\n",
 __FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid );
 #endif
@@ -1621,5 +1621,5 @@
 #if(DEBUG_PROCESS_INIT_CREATE & 1)
 if( DEBUG_PROCESS_INIT_CREATE < cycle )
-printk("\n[DBG] %s : thread %x in process %x registered code/data vsegs in VMM\n",
+printk("\n[%s] thread %x in process %x registered code/data vsegs in VMM\n",
 __FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid );
 #endif
@@ -1641,5 +1641,5 @@
 #if(DEBUG_PROCESS_INIT_CREATE & 1)
 if( DEBUG_PROCESS_INIT_CREATE < cycle )
-printk("\n[DBG] %s : thread %x in process %x registered init process in parent\n",
+printk("\n[%s] thread %x in process %x registered init process in parent\n",
 __FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid );
 #endif
@@ -1668,5 +1668,5 @@
 #if(DEBUG_PROCESS_INIT_CREATE & 1)
 if( DEBUG_PROCESS_INIT_CREATE < cycle )
-printk("\n[DBG] %s : thread %x in process %x created main thread\n",
+printk("\n[%s] thread %x in process %x created main thread\n",
 __FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid );
 #endif
@@ -1680,5 +1680,5 @@
 cycle = (uint32_t)hal_get_cycles();
 if( DEBUG_PROCESS_INIT_CREATE < cycle )
-printk("\n[DBG] %s : thread %x in process %x exit / cycle %d\n",
+printk("\n[%s] thread %x in process %x exit / cycle %d\n",
 __FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid, cycle );
 #endif
@@ -1867,5 +1867,5 @@
 uint32_t cycle = (uint32_t)hal_get_cycles();
 if( DEBUG_PROCESS_TXT < cycle )
-printk("\n[DBG] %s : thread %x in process %x attached process %x to TXT %d / cycle %d\n",
+printk("\n[%s] thread %x in process %x attached process %x to TXT %d / cycle %d\n",
 __FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid,
 process->pid, txt_id , cycle );
@@ -1922,5 +1922,5 @@
 uint32_t txt_id = hal_remote_l32( XPTR( chdev_cxy , &chdev_ptr->channel ) );
 if( DEBUG_PROCESS_TXT < cycle )
-printk("\n[DBG] %s : thread %x in process %x detached process %x from TXT %d / cycle %d\n",
+printk("\n[%s] thread %x in process %x detached process %x from TXT %d / cycle %d\n",
 __FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid,
 process_pid, txt_id, cycle );
@@ -1964,5 +1964,5 @@
 uint32_t txt_id = hal_remote_l32( XPTR( txt_cxy , &txt_ptr->channel ) );
 if( DEBUG_PROCESS_TXT < cycle )
-printk("\n[DBG] %s : thread %x in process %x give TXT %d to process %x / cycle %d\n",
+printk("\n[%s] thread %x in process %x give TXT %d to process %x / cycle %d\n",
 __FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid, txt_id, process_pid, cycle );
 #endif
@@ -2045,5 +2045,5 @@
 uint32_t ksh_pid = hal_remote_l32( XPTR( current_cxy , &current_ptr->pid ) );
 if( DEBUG_PROCESS_TXT < cycle )
-printk("\n[DBG] %s : thread %x in process %x release TXT %d to KSH %x / cycle %d\n",
+printk("\n[%s] thread %x in process %x release TXT %d to KSH %x / cycle %d\n",
 __FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid, txt_id, ksh_pid, cycle );
 process_txt_display( txt_id );
@@ -2082,5 +2082,5 @@
 uint32_t new_pid = hal_remote_l32( XPTR( current_cxy , &current_ptr->pid ) );
 if( DEBUG_PROCESS_TXT < cycle )
-printk("\n[DBG] %s : thread %x in process %x release TXT %d to process %x / cycle %d\n",
+printk("\n[%s] thread %x in process %x release TXT %d to process %x / cycle %d\n",
 __FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid, txt_id, new_pid, cycle );
 process_txt_display( txt_id );
@@ -2099,5 +2099,5 @@
 cycle = (uint32_t)hal_get_cycles();
 if( DEBUG_PROCESS_TXT < cycle )
-printk("\n[DBG] %s : thread %x in process %x release TXT %d to nobody / cycle %d\n",
+printk("\n[%s] thread %x in process %x release TXT %d to nobody / cycle %d\n",
 __FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid, txt_id, cycle );
 process_txt_display( txt_id );
@@ -2112,5 +2112,5 @@
 cycle = (uint32_t)hal_get_cycles();
 if( DEBUG_PROCESS_TXT < cycle )
-printk("\n[DBG] %s : thread %x in process %d does nothing (not TXT owner) / cycle %d\n",
+printk("\n[%s] thread %x in process %d does nothing (not TXT owner) / cycle %d\n",
 __FUNCTION__, CURRENT_THREAD->trdid, process_pid, cycle );
 process_txt_display( txt_id );
