aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2022-11-28 15:19:38 +0100
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2022-11-28 15:19:47 +0100
commitf4854f39c6e1a7e130b4a33a15da1044801e0d1c (patch)
tree819db09c1c02f4c957f9a38e736c8d2b00f2faf0
parent2b283b1a1a93b10a20dcc9f5668e200eb7cf3b5b (diff)
osmo_tdef_get(): clarify API doc on val_if_not_present
-rw-r--r--src/tdef.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/tdef.c b/src/tdef.c
index 7741a449..abbe581a 100644
--- a/src/tdef.c
+++ b/src/tdef.c
@@ -200,8 +200,10 @@ void osmo_tdefs_reset(struct osmo_tdef *tdefs)
* \param[in] tdefs Array of timer definitions, last entry must be fully zero initialized.
* \param[in] T Timer number to get the value for.
* \param[in] as_unit Return timeout value in this unit.
- * \param[in] val_if_not_present Fallback value to return if no timeout is defined.
+ * \param[in] val_if_not_present Fallback value to return if no timeout is defined; if this is a negative number, a
+ * missing T timer definition aborts the program via OSMO_ASSERT().
* \return Timeout value in the unit given by as_unit, rounded up if necessary, or val_if_not_present.
+ * If val_if_not_present is negative and no T timer is defined, trigger OSMO_ASSERT() and do not return.
*/
unsigned long osmo_tdef_get(const struct osmo_tdef *tdefs, int T, enum osmo_tdef_unit as_unit, long val_if_not_present)
{