Index: trunk/kernel/syscalls/sys_display.c
===================================================================
--- trunk/kernel/syscalls/sys_display.c	(revision 506)
+++ trunk/kernel/syscalls/sys_display.c	(revision 580)
@@ -48,4 +48,6 @@
     else if( type == DISPLAY_CHDEV             ) return "CHDEV"; 
     else if( type == DISPLAY_TXT_PROCESSES     ) return "TXT_PROCESSES"; 
+    else if( type == DISPLAY_DQDT              ) return "DQDT";
+    else if( type == DISPLAY_BUSYLOCKS         ) return "BUSYLOCKS"; 
 }
 #endif
@@ -87,6 +89,6 @@
 
 #if DEBUG_SYSCALLS_ERROR
-printk("\n[ERROR] in %s : string buffer %x unmapped / thread %x / process %x\n",
-__FUNCTION__ , (intptr_t)arg0 , this->trdid , process->pid );
+printk("\n[ERROR] in %s for STRING : string buffer %x unmapped\n",
+__FUNCTION__ , (intptr_t)arg0 );
 #endif
             this->errno = EINVAL;
@@ -101,6 +103,6 @@
 
 #if DEBUG_SYSCALLS_ERROR
-printk("\n[ERROR] in %s : string length %d too large / thread %x / process %x\n",
-__FUNCTION__ , length , this->trdid , process->pid );
+printk("\n[ERROR] in %s for STRING : string length %d too large\n",
+__FUNCTION__ , length );
 #endif
             this->errno = EINVAL;
@@ -125,6 +127,6 @@
 
 #if DEBUG_SYSCALLS_ERROR
-printk("\n[ERROR] in %s : illegal cxy argument %x / thread %x / process %x\n",
-__FUNCTION__ , cxy , this->trdid , process->pid );
+printk("\n[ERROR] in %s for VMM : process %x in cluster %x not found\n",
+__FUNCTION__ , pid , cxy );
 #endif
             this->errno = EINVAL;
@@ -139,6 +141,6 @@
 
 #if DEBUG_SYSCALLS_ERROR
-printk("\n[ERROR] in %s : process %x in cluster %x not found / thread %x / process %x\n",
-__FUNCTION__ , pid , cxy , this->trdid , process->pid );
+printk("\n[ERROR] in %s for VMM : process %x in cluster %x not found\n",
+__FUNCTION__ , pid , cxy );
 #endif
             this->errno = EINVAL;
@@ -170,6 +172,6 @@
 
 #if DEBUG_SYSCALLS_ERROR
-printk("\n[ERROR] in %s : illegal cxy argument %x / thread %x / process %x\n",
-__FUNCTION__ , cxy , this->trdid , process->pid );
+printk("\n[ERROR] in %s for SCHED : illegal cxy argument %x\n",
+__FUNCTION__ , cxy );
 #endif
             this->errno = EINVAL;
@@ -182,6 +184,6 @@
 
 #if DEBUG_SYSCALLS_ERROR
-printk("\n[ERROR] in %s : illegal lid argument %x / thread %x / process %x\n",
-__FUNCTION__ , lid , this->trdid , process->pid );
+printk("\n[ERROR] in %s for SCHED : illegal lid argument %x\n",
+__FUNCTION__ , lid );
 #endif
             this->errno = EINVAL;
@@ -208,6 +210,6 @@
 
 #if DEBUG_SYSCALLS_ERROR
-printk("\n[ERROR] in %s : illegal cxy argument %x / thread %x / process %x\n",
-__FUNCTION__ , cxy , this->trdid , process->pid );
+printk("\n[ERROR] in %s for CLUSTER_PROCESSES : illegal cxy argument %x\n",
+__FUNCTION__ , cxy );
 #endif
             this->errno = EINVAL;
@@ -216,4 +218,14 @@
 
         cluster_processes_display( cxy );
+    }
+    //////////////////////////////
+    else if( type == DISPLAY_VFS )
+    {
+        vfs_display( process->vfs_root_xp );
+    }
+    ////////////////////////////////
+    else if( type == DISPLAY_CHDEV )
+    {
+        chdev_dir_display();
     }
     ////////////////////////////////////////
@@ -227,6 +239,6 @@
 
 #if DEBUG_SYSCALLS_ERROR
-printk("\n[ERROR] in %s : illegal txt_id argument %d / thread %x / process %x\n",
-__FUNCTION__ , txt_id , this->trdid , process->pid );
+printk("\n[ERROR] in %s for TXT_PROCESSES : illegal txt_id argument %d\n",
+__FUNCTION__ , txt_id );
 #endif
             this->errno = EINVAL;
@@ -236,18 +248,30 @@
         process_txt_display( txt_id );
     }
-    //////////////////////////////
-    else if( type == DISPLAY_VFS )
-    {
-        vfs_display( process->vfs_root_xp );
-    }
-    ////////////////////////////////
-    else if( type == DISPLAY_CHDEV )
-    {
-        chdev_dir_display();
-    }
-    ////////////////////////////////
+    ///////////////////////////////
     else if( type == DISPLAY_DQDT )
     {
         dqdt_display();
+    }
+    ////////////////////////////////////
+    else if( type == DISPLAY_BUSYLOCKS )
+    {
+        pid_t   pid   = (cxy_t)arg0;
+        trdid_t trdid = (trdid_t)arg1;
+
+        // get extended pointer on target thread
+        xptr_t thread_xp = thread_get_xptr( pid , trdid );
+
+        if( thread_xp == XPTR_NULL )
+        {
+
+#if DEBUG_SYSCALLS_ERROR
+printk("\n[ERROR] in %s for BUSYLOCKS : thread %x in process %x not found\n",
+__FUNCTION__ , trdid , pid );
+#endif
+            this->errno = EINVAL;
+            return -1;
+        }
+
+        thread_display_busylocks( thread_xp );
     }
     ////
@@ -256,6 +280,6 @@
 
 #if DEBUG_SYSCALLS_ERROR
-printk("\n[ERROR] in %s : undefined display type %x / thread %x / process %x\n",
-        __FUNCTION__ , type , this->trdid , process->pid );
+printk("\n[ERROR] in %s : undefined display type %d\n",
+        __FUNCTION__ , type );
 #endif
         this->errno = EINVAL;
