#define ACTION_INITIAL_CLOCK 0
+/** A special value to represent a successful trylock */
+#define VALUE_TRYSUCCESS 1
+
+/** A special value to represent a failed trylock */
+#define VALUE_TRYFAILED 0
+
/**
* @brief Construct a new ModelAction
*
cv = new ClockVector(NULL, this);
}
-void ModelAction::set_try_lock(bool obtainedlock) {
- if (obtainedlock)
- value = VALUE_TRYSUCCESS;
- else
- value = VALUE_TRYFAILED;
+void ModelAction::set_try_lock(bool obtainedlock)
+{
+ value = obtainedlock ? VALUE_TRYSUCCESS : VALUE_TRYFAILED;
}
/**
* hence by iteself does not indicate no value. */
#define VALUE_NONE 0xdeadbeef
-/** A special value to represent a successful trylock */
-#define VALUE_TRYSUCCESS 1
-
-/** A special value to represent a failed trylock */
-#define VALUE_TRYFAILED 0
-
/** @brief Represents an action type, identifying one of several types of
* ModelAction */
typedef enum action_type {