From f21e6f4956e55ea1fb4c3ee5fed01f503ddb2344 Mon Sep 17 00:00:00 2001 From: alegrand Date: Wed, 21 May 2008 09:53:01 +0000 Subject: [PATCH] Well the output of printf("%p",NULL) might depend on the system. So let's use a more stable convetion and revalidate the output. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@5483 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- examples/msg/masterslave/masterslave_failure.tesh | 2 +- src/simix/smx_global.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/msg/masterslave/masterslave_failure.tesh b/examples/msg/masterslave/masterslave_failure.tesh index 38118c5a4a..ab7ddd1b54 100644 --- a/examples/msg/masterslave/masterslave_failure.tesh +++ b/examples/msg/masterslave/masterslave_failure.tesh @@ -110,6 +110,6 @@ $ masterslave/masterslave_failure$EXEEXT small_platform_with_failures.xml master > [23.861529] [simix_kernel/INFO] Oops ! Deadlock or code not perfectly clean. > [23.861529] [simix_kernel/INFO] 1 processes are still running, waiting for something. > [23.861529] [simix_kernel/INFO] Legend of the following listing: " on : ." -> [23.861529] [simix_kernel/INFO] slave on Ginette: Blocked on condition 0x806fbf8; Waiting for the following actions: 'sleep'(0x806fba0). +> [23.861529] [simix_kernel/INFO] slave on Ginette: Blocked on condition 0xdead; Waiting for the following actions: 'sleep'(0xdead). > [23.861529] [simix_kernel/INFO] Return a Warning. > [23.861529] [msg_test/INFO] Simulation time 23.8615 diff --git a/src/simix/smx_global.c b/src/simix/smx_global.c index 51e80503d3..fc1135fff3 100644 --- a/src/simix/smx_global.c +++ b/src/simix/smx_global.c @@ -153,18 +153,18 @@ void SIMIX_display_process_status(void) : ((process->simdata->suspended) ? "[SUSPENDED] " : "")); if (p_simdata->mutex) { - who2 = bprintf("%s Blocked on mutex %p", who, (XBT_LOG_ISENABLED(simix_kernel,xbt_log_priority_verbose))?p_simdata->mutex:NULL); + who2 = bprintf("%s Blocked on mutex %p", who, (XBT_LOG_ISENABLED(simix_kernel,xbt_log_priority_verbose))?p_simdata->mutex:(void*)0xdead); free(who); who = who2; } else if (p_simdata->cond) { who2 = bprintf ("%s Blocked on condition %p; Waiting for the following actions:", - who, (XBT_LOG_ISENABLED(simix_kernel,xbt_log_priority_verbose))?p_simdata->cond:NULL); + who, (XBT_LOG_ISENABLED(simix_kernel,xbt_log_priority_verbose))?p_simdata->cond:(void*)0xdead); free(who); who = who2; xbt_fifo_foreach(p_simdata->cond->actions, item, act, smx_action_t) { - who2 = bprintf("%s '%s'(%p)", who, act->name,(XBT_LOG_ISENABLED(simix_kernel,xbt_log_priority_verbose))?act:NULL); + who2 = bprintf("%s '%s'(%p)", who, act->name,(XBT_LOG_ISENABLED(simix_kernel,xbt_log_priority_verbose))?act:(void*)0xdead); free(who); who = who2; } -- 2.20.1