aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2022-11-17 20:25:40 +0100
committerPau Espin Pedrol <pespin@sysmocom.de>2022-11-18 14:16:55 +0100
commit06abd3ea194dc2428e676a46bf1a3348d31d2f0b (patch)
tree140d7ef4861bf0f20cda7289eda8910de98aaf7b
parentdc6a860d0a4d43e4d01e56803e81580c45447caa (diff)
tbf_fsm: Move tbf_fsm_state_chg macro to .c file
It is nowadays only used internally, hence it can be moved to the .c file to better describe its scope. Change-Id: I23cfa5b7efbeb6a58855099780749741c9c947e9
-rw-r--r--src/tbf_fsm.c9
-rw-r--r--src/tbf_fsm.h10
2 files changed, 9 insertions, 10 deletions
diff --git a/src/tbf_fsm.c b/src/tbf_fsm.c
index 6fe2a7ac..c08fb880 100644
--- a/src/tbf_fsm.c
+++ b/src/tbf_fsm.c
@@ -38,6 +38,15 @@ const struct osmo_tdef_state_timeout tbf_fsm_timeouts[32] = {
[TBF_ST_RELEASING] = {},
};
+/* Transition to a state, using the T timer defined in tbf_fsm_timeouts.
+ * The actual timeout value is in turn obtained from conn->T_defs.
+ * Assumes local variable fi exists. */
+#define tbf_fsm_state_chg(fi, NEXT_STATE) \
+ osmo_tdef_fsm_inst_state_chg(fi, NEXT_STATE, \
+ tbf_fsm_timeouts, \
+ the_pcu->T_defs, \
+ -1)
+
const struct value_string tbf_fsm_event_names[] = {
{ TBF_EV_ASSIGN_ADD_CCCH, "ASSIGN_ADD_CCCH" },
{ TBF_EV_ASSIGN_ADD_PACCH, "ASSIGN_ADD_PACCH" },
diff --git a/src/tbf_fsm.h b/src/tbf_fsm.h
index 0acd4e58..c46d86c1 100644
--- a/src/tbf_fsm.h
+++ b/src/tbf_fsm.h
@@ -56,14 +56,4 @@ struct tbf_fsm_ctx {
unsigned int T_release; /* Timer to be used to end release: T3169 or T3195 */
};
-extern const struct osmo_tdef_state_timeout tbf_fsm_timeouts[32];
-/* Transition to a state, using the T timer defined in tbf_fsm_timeouts.
- * The actual timeout value is in turn obtained from conn->T_defs.
- * Assumes local variable fi exists. */
-#define tbf_fsm_state_chg(fi, NEXT_STATE) \
- osmo_tdef_fsm_inst_state_chg(fi, NEXT_STATE, \
- tbf_fsm_timeouts, \
- the_pcu->T_defs, \
- -1)
-
extern struct osmo_fsm tbf_fsm;