ameliorate process list hash function
authorcompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Thu, 12 Aug 2004 16:38:27 +0000 (16:38 +0000)
committercompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Thu, 12 Aug 2004 16:38:27 +0000 (16:38 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@717 04897980-b3bd-0310-b5e0-8ef037075253

ltt/branches/poly/lttv/modules/gui/controlflow/processlist.c

index 0a29dfe1e9fa2109590d29ccfb96192d9a26996d..6e2ec2c75fcade1b85face1721c7419169496683 100644 (file)
@@ -235,7 +235,7 @@ gint process_sort_func  ( GtkTreeModel *model,
 
 static guint hash_fct(gconstpointer key)
 {
-  return ((ProcessInfo*)key)->pid;
+  return ((ProcessInfo*)key)->pid ^ ((ProcessInfo*)key)->cpu;
 }
 
 static gboolean equ_fct(gconstpointer a, gconstpointer b)
@@ -541,7 +541,10 @@ int processlist_remove( ProcessList *process_list,
   GtkTreeIter iter;
   
   Process_Info.pid = pid;
-  Process_Info.cpu = cpu;
+  if(pid == 0)
+    Process_Info.cpu = cpu;
+  else
+    Process_Info.cpu = 0;
   Process_Info.birth = *birth;
   Process_Info.trace_num = trace_num;
 
@@ -587,7 +590,10 @@ __inline gint processlist_get_process_pixels(  ProcessList *process_list,
   HashedProcessData *hashed_process_data = NULL;
 
   Process_Info.pid = pid;
-  Process_Info.cpu = cpu;
+  if(pid == 0)
+    Process_Info.cpu = cpu;
+  else
+    Process_Info.cpu = 0;
   Process_Info.birth = *birth;
   Process_Info.trace_num = trace_num;
 
This page took 0.024784 seconds and 4 git commands to generate.