This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Neels Hofmeyr gerrit-no-reply at lists.osmocom.orgNeels Hofmeyr has submitted this change and it was merged.
Change subject: fsm: convenience: add inline osmo_fsm_inst_state_name()
......................................................................
fsm: convenience: add inline osmo_fsm_inst_state_name()
Change-Id: If9a6ecc4d6e2beaf716569e9a6053d73488e860b
---
M include/osmocom/core/fsm.h
1 file changed, 4 insertions(+), 0 deletions(-)
Approvals:
Harald Welte: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/include/osmocom/core/fsm.h b/include/osmocom/core/fsm.h
index 952f82f..3a1f233 100644
--- a/include/osmocom/core/fsm.h
+++ b/include/osmocom/core/fsm.h
@@ -152,6 +152,10 @@
const char *osmo_fsm_inst_name(struct osmo_fsm_inst *fi);
const char *osmo_fsm_state_name(struct osmo_fsm *fsm, uint32_t state);
+/*! \brief return the name of the state the FSM instance is currently in. */
+static inline const char *osmo_fsm_inst_state_name(struct osmo_fsm_inst *fi)
+{ return osmo_fsm_state_name(fi->fsm, fi->state); }
+
/*! \brief perform a state change of the given FSM instance
*
* This is a macro that calls _osmo_fsm_inst_state_chg() with the given
--
To view, visit https://gerrit.osmocom.org/1937
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: If9a6ecc4d6e2beaf716569e9a6053d73488e860b
Gerrit-PatchSet: 3
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>