modify the clist
authorSooChan Lim <sc1.lim@samsung.com>
Thu, 4 Apr 2013 04:37:12 +0000 (13:37 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Thu, 4 Apr 2013 04:42:38 +0000 (13:42 +0900)
Change-Id: I572463e7d34cb2f87a467ba2c35a7c6892bcf68d

module/xdbg_module_clist.c
module/xdbg_module_clist.h [changed mode: 0644->0755]

index 82bad99..48c9aad 100755 (executable)
@@ -34,59 +34,22 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #endif
 
 #include <stdio.h>
-#include <string.h>
-#include <strings.h>
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <unistd.h>
-#include <stdarg.h>
-#include <fcntl.h>
-#include <unistd.h>
-
-#define XREGISTRY
-#include <registry.h>
 
 #include "xdbg.h"
 #include "xdbg_module_types.h"
 
 
-static void
-_findSyncAwait (pointer value, XID id, pointer cdata)
-{
-    Bool *sync_await = cdata;
-
-    if (sync_await)
-        *sync_await = TRUE;
-}
-
 void
-xDbgModuleCList (XDbgModule *pMod, char *reply, int *remain)
+xDbgModuleCList (XDbgModule *pMod, char *reply, int *len)
 {
-    char *p = reply;
-    int i, len;
-    RESTYPE res_type = 0;
-    const char *name;
+    int i;
 
-    len = snprintf (p, *remain, "%6s   %6s   %s   %s   %s\n", "INDEX", "PID", "SYNC_AWAIT", "BLOCKED", "NAME");
-    p += len;
-    *remain -= len;
+    XDBG_REPLY ("%6s   %6s   %s   %s\n", "INDEX", "PID", "BLOCKED", "NAME");
 
-    /* get the res_type of SyncAwait */
-    for (i = 0; i < lastResourceType; i++)
-    {
-        name = LookupResourceName(i + 1);
-        if (!strcmp(name, "SyncAwait"))
-        {
-            res_type = i + 1;
-            break;
-        }
-    }
-
-    for (i = 1; i < currentMaxClients && (0 < *remain); i++)
+    for (i = 1; i < currentMaxClients && (0 < *len); i++)
     {
         ClientPtr pClient = clients[i];
         ModuleClientInfo *info;
-        Bool sync_await;
 
         if (!pClient)
             continue;
@@ -95,13 +58,7 @@ xDbgModuleCList (XDbgModule *pMod, char *reply, int *remain)
         if (!info)
             continue;
 
-        /* find SyncAwait resources */
-        sync_await = FALSE;
-        FindClientResourcesByType (pClient, res_type, _findSyncAwait, &sync_await);
-
-        len = snprintf (p, *remain, "%6d   %6d    %4d         %4d      %9s\n",
-                        info->index, info->pid, sync_await, pClient->ignoreCount, info->command);
-        p += len;
-        *remain -= len;
+        XDBG_REPLY ("%6d   %6d   %4d      %9s\n",
+                        info->index, info->pid, pClient->ignoreCount, info->command);
     }
 }
old mode 100644 (file)
new mode 100755 (executable)
index ab4dec1..eaed740
@@ -34,6 +34,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 #include "xdbg_module_types.h"
 
-void xDbgModuleCList (XDbgModule *pMod, char *reply, int *remain);
+void xDbgModuleCList (XDbgModule *pMod, char *reply, int *len);
 
 #endif /* __XDBG_MODULE_CLIST_H__ */
\ No newline at end of file