Index: trunk/kernel/syscalls/sys_exit.c
===================================================================
--- trunk/kernel/syscalls/sys_exit.c	(revision 566)
+++ trunk/kernel/syscalls/sys_exit.c	(revision 584)
@@ -38,6 +38,4 @@
 int sys_exit( uint32_t status )
 {
-    reg_t       save_sr;           // required to enable IRQs
-
     xptr_t      owner_xp;          // extended pointer on owner process
     cxy_t       owner_cxy;         // owner process cluster
@@ -60,6 +58,6 @@
 tm_start = hal_get_cycles();
 if( DEBUG_SYS_EXIT < tm_start )
-printk("\n[DBG] %s : thread %x in process %x enter / status %x / cycle %d\n",
-__FUNCTION__, this->trdid, process->pid , status , (uint32_t)tm_start );
+printk("\n[DBG] %s : thread[%x,%x] enter / status %x / cycle %d\n",
+__FUNCTION__, process->pid, this->trdid , status , (uint32_t)tm_start );
 #endif
 
@@ -71,6 +69,6 @@
 #if (DEBUG_SYS_EXIT & 1)
 if( DEBUG_SYS_EXIT < tm_start )
-printk("\n[DBG] %s : thread %x in process %x get owner process in cluster %x\n",
-__FUNCTION__, this->trdid, process->pid, owner_cxy );
+printk("\n[DBG] %s : thread[%x,%x] get owner process in cluster %x\n",
+__FUNCTION__, process->pid, this->trdid, owner_cxy );
 #endif
 
@@ -85,6 +83,6 @@
 #if (DEBUG_SYS_EXIT & 1)
 if( DEBUG_SYS_EXIT < tm_start )
-printk("\n[DBG] %s : thread %x in process %x get parent process in cluster %x\n",
-__FUNCTION__, this->trdid, process->pid, parent_cxy );
+printk("\n[DBG] %s : thread[%x,%x] get parent process in cluster %x\n",
+__FUNCTION__, process->pid, this->trdid, parent_cxy );
 #endif
 
@@ -98,18 +96,16 @@
 #if( DEBUG_SYS_EXIT & 1)
 if( DEBUG_SYS_EXIT < tm_start )
-printk("\n[DBG] %s : thread %x in process %x detached process from TXT\n",
-__FUNCTION__, this->trdid, process->pid );
+printk("\n[DBG] %s : thread[%x,%x] detached process from TXT\n",
+__FUNCTION__, process->pid, this->trdid );
 #endif
 
     // mark for delete all process threads in all clusters, 
     // but the main thread and this calling thread 
-    hal_enable_irq( &save_sr );
     process_sigaction( process->pid , DELETE_ALL_THREADS );
-    hal_restore_irq( save_sr );
 
 #if( DEBUG_SYS_EXIT & 1)
 if( DEBUG_SYS_EXIT < tm_start )
-printk("\n[DBG] %s : thread %x in process %x deleted all threads but itself\n",
-__FUNCTION__, this->trdid, process->pid );
+printk("\n[DBG] %s : thread[%x,%x] deleted all threads but itself\n",
+__FUNCTION__, process->pid, this->trdid );
 #endif
 
@@ -120,6 +116,6 @@
 #if( DEBUG_SYS_EXIT & 1)
 if( tm_start > DEBUG_SYS_EXIT )
-printk("\n[DBG] %s : thread %x in process %x marked iself for delete\n",
-__FUNCTION__, this->trdid, process->pid );
+printk("\n[DBG] %s : thread[%x,%x] marked iself for delete\n",
+__FUNCTION__, process->pid, this->trdid );
 #endif
         thread_delete( XPTR( local_cxy , this ) , pid , true );
@@ -131,6 +127,6 @@
 #if( DEBUG_SYS_EXIT & 1)
 if( tm_start > DEBUG_SYS_EXIT )
-printk("\n[DBG] %s : thread %x in process %x blocked main thread\n",
-__FUNCTION__, this->trdid, process->pid );
+printk("\n[DBG] %s : thread[%x,%x] blocked main thread\n",
+__FUNCTION__, process->pid, this->trdid );
 #endif
 
@@ -142,6 +138,6 @@
 #if( DEBUG_SYS_EXIT & 1)
 if( tm_start > DEBUG_SYS_EXIT )
-printk("\n[DBG] %s : thread %x in process %x set exit status %x in owner process\n",
-__FUNCTION__, this->trdid, process->pid, term_state );
+printk("\n[DBG] %s : thread[%x,%x] set exit status %x in owner process\n",
+__FUNCTION__, process->pid, this->trdid, term_state );
 #endif
 
@@ -151,6 +147,6 @@
 #if( DEBUG_SYS_EXIT & 1)
 if( tm_start > DEBUG_SYS_EXIT )
-printk("\n[DBG] %s : thread %x in process %x unblocked parent main thread in process %x\n",
-__FUNCTION__ , this->trdid, process->pid,
+printk("\n[DBG] %s : thread[%x,%x] unblocked parent main thread in process %x\n",
+__FUNCTION__ , process->pid, this->trdid,
 hal_remote_l32( XPTR( parent_cxy , &parent_ptr->pid) ) );
 #endif
@@ -161,6 +157,6 @@
 tm_end = hal_get_cycles();
 if( DEBUG_SYS_EXIT < tm_end )
-printk("\n[DBG] %s : thread %x in process %x exit / status %x / cost = %d / cycle %d\n",
-__FUNCTION__, this->trdid, process->pid, status,
+printk("\n[DBG] %s : thread[%x,%x] exit / status %x / cost = %d / cycle %d\n",
+__FUNCTION__, process->pid, this->trdid, status,
 (uint32_t)(tm_end - tm_start), (uint32_t)tm_end );
 #endif
