From: mquinson Date: Thu, 4 Mar 2010 14:46:04 +0000 (+0000) Subject: display correctly when processes are locked into a semaphore (forgot to augment this... X-Git-Tag: SVN~550 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/0e68761df671363be8da27a5824ec49f0fe91060?ds=sidebyside display correctly when processes are locked into a semaphore (forgot to augment this function when I added the semaphore concept to simix, sorry) git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@7189 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/src/simix/smx_global.c b/src/simix/smx_global.c index 6daaf17e82..dffafbeda1 100644 --- a/src/simix/smx_global.c +++ b/src/simix/smx_global.c @@ -135,6 +135,24 @@ void SIMIX_display_process_status(void) free(who); who = who2; } + } else if (process->sem) { + who2 = + bprintf + ("%s Blocked on semaphore %p; Waiting for the following actions:", + who, + (XBT_LOG_ISENABLED(simix_kernel, xbt_log_priority_verbose)) ? + process->sem : (void *) 0xdead); + free(who); + who = who2; + xbt_fifo_foreach(process->sem->actions, item, act, smx_action_t) { + who2 = + bprintf("%s '%s'(%p)", who, act->name, + (XBT_LOG_ISENABLED(simix_kernel, xbt_log_priority_verbose)) + ? act : (void *) 0xdead); + free(who); + who = who2; + } + } else { who2 = bprintf