+
+ if(XBT_LOG_ISENABLED(simix_action, xbt_log_priority_debug))
+ __SIMIX_action_display_conditions(action);
+}
+/**
+ * \brief Link an action to a semaphore
+ *
+ * When the action terminates, the semaphore gets signaled automatically.
+ */
+XBT_INLINE void SIMIX_register_action_to_semaphore(smx_action_t action, smx_sem_t sem) {
+
+ DEBUG2("Register action %p to semaphore %p (and otherwise)", action, sem);
+ xbt_fifo_push(sem->actions, action);
+ xbt_fifo_push(action->sem_list, sem);
+}
+/**
+ * \brief Unset an action to a semaphore.
+ *
+ * Destroys the "links" from the semaphore to this action.
+ */
+XBT_INLINE void SIMIX_unregister_action_to_semaphore(smx_action_t action,
+ smx_sem_t sem)
+{
+ xbt_fifo_remove_all(sem->actions, action);
+ xbt_fifo_remove_all(action->sem_list, sem);