- if (process->mutex) {
- who2 =
- bprintf("%s Blocked on mutex %p", who,
- (XBT_LOG_ISENABLED(simix_kernel, xbt_log_priority_verbose)) ?
- process->mutex : (void *) 0xdead);
- free(who);
- who = who2;
- } else if (process->cond) {
- who2 =
- bprintf
- ("%s Blocked on condition %p; Waiting for the following actions:",
- who,
- (XBT_LOG_ISENABLED(simix_kernel, xbt_log_priority_verbose)) ?
- process->cond : (void *) 0xdead);
- free(who);
- who = who2;
- xbt_fifo_foreach(process->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 : (void *) 0xdead);
- 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;
- }
+ const char* action_description = "unknown";
+ switch (process->waiting_action->type) {
+
+ case SIMIX_ACTION_EXECUTE:
+ action_description = "execution";
+ break;
+
+ case SIMIX_ACTION_PARALLEL_EXECUTE:
+ action_description = "parallel execution";
+ break;
+
+ case SIMIX_ACTION_COMMUNICATE:
+ action_description = "communication";
+ break;