diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2019-09-05 13:30:48 +0200 |
---|---|---|
committer | pespin <pespin@sysmocom.de> | 2019-09-07 22:29:06 +0000 |
commit | 77cd10f0db6ebd0e3a5b6d8136470bc4adccdd57 (patch) | |
tree | 323455333ff2bc0bbcb237f4d860e241f7cfaf2f /include/osmocom | |
parent | 994df263faecc280b0ebf47f2309d48b0dd9a329 (diff) |
tdef: Introduce API osmo_tdef_set()
This API is already useful for users willing to set a given timer to a
given value. It will also contain code later that checks for value being
inside valid range for that timer.
Related: OS#4190
Change-Id: Id56a1226d724a374f04231df85fe5b49ffd2c43c
Diffstat (limited to 'include/osmocom')
-rw-r--r-- | include/osmocom/core/tdef.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/osmocom/core/tdef.h b/include/osmocom/core/tdef.h index 566f5dd3..a1ad4ccb 100644 --- a/include/osmocom/core/tdef.h +++ b/include/osmocom/core/tdef.h @@ -97,6 +97,7 @@ void osmo_tdefs_reset(struct osmo_tdef *tdefs); unsigned long osmo_tdef_get(const struct osmo_tdef *tdefs, int T, enum osmo_tdef_unit as_unit, long val_if_not_present); struct osmo_tdef *osmo_tdef_get_entry(struct osmo_tdef *tdefs, int T); +int osmo_tdef_set(struct osmo_tdef *tdefs, int T, unsigned long val, enum osmo_tdef_unit as_unit); /*! Using osmo_tdef for osmo_fsm_inst: array entry for a mapping of state numbers to timeout definitions. * For a usage example, see osmo_tdef_get_state_timeout() and test_tdef_state_timeout() in tdef_test.c. */ |