From 324cdea4f15ec609880790b4eb2add737144c376 Mon Sep 17 00:00:00 2001 From: compudj Date: Thu, 12 Aug 2004 16:38:27 +0000 Subject: [PATCH] ameliorate process list hash function git-svn-id: http://ltt.polymtl.ca/svn@717 04897980-b3bd-0310-b5e0-8ef037075253 --- .../poly/lttv/modules/gui/controlflow/processlist.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/ltt/branches/poly/lttv/modules/gui/controlflow/processlist.c b/ltt/branches/poly/lttv/modules/gui/controlflow/processlist.c index 0a29dfe1..6e2ec2c7 100644 --- a/ltt/branches/poly/lttv/modules/gui/controlflow/processlist.c +++ b/ltt/branches/poly/lttv/modules/gui/controlflow/processlist.c @@ -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; -- 2.34.1