aboutsummaryrefslogtreecommitdiffstats
path: root/src/mslot_class.h
diff options
context:
space:
mode:
authorMax <msuraev@sysmocom.de>2018-02-05 16:15:30 +0100
committerHarald Welte <laforge@gnumonks.org>2018-02-21 12:08:40 +0000
commit731e2bb328f6b0d739fa21913eb30cff8a46c70c (patch)
tree2c82ae7d2b9ae6317b2a08c1fe6ce06bef458752 /src/mslot_class.h
parent77988d469d5cd0d876188a829b93890049cc6830 (diff)
Simplify TS alloc: move slot check into functions
Move timeslot applicability check outside of nested for loop into separate functions and document them. Add corresponding tests. This allows us to clarify types used in TS-related computations. Change-Id: Ic39e848da47dc11357782362fdf6206d2c1457c2 Related: OS#2282
Diffstat (limited to 'src/mslot_class.h')
-rw-r--r--src/mslot_class.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mslot_class.h b/src/mslot_class.h
index 445455f4..045fb317 100644
--- a/src/mslot_class.h
+++ b/src/mslot_class.h
@@ -57,3 +57,6 @@ int8_t find_free_usf(uint8_t usf_map);
int8_t find_free_tfi(uint32_t tfi_map);
void masked_override_with(char *buf, uint8_t mask, char set_char);
void ts_format(char *buf, uint8_t dl_mask, uint8_t ul_mask);
+uint16_t mslot_wrap_window(uint16_t win);
+bool mslot_test_and_set_bit(uint32_t *bits, size_t elem);
+int16_t mslot_filter_bad(uint8_t mask, uint8_t ul_slots, uint8_t dl_slots, uint16_t rx_valid_win);