diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2013-10-17 19:59:56 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2013-10-30 21:20:45 +0100 |
commit | 9b30c7f46e2c55aed06cea8d1daa9093f331fb20 (patch) | |
tree | 53af4df3d3209ca34b2747a5ee8ef6b4e75041c8 /src/gsm_timer.cpp | |
parent | b6acfdaa24851e1aa95bfc4611709737aaafa5f1 (diff) |
bts: Move the frame_number into the BTS sructure
The current_frame is an attribute of the BTS. Move it from the
pcu_l1_if.cpp into the BTS. As the next step we can trigger
actions depending on the change of the frame.
Diffstat (limited to 'src/gsm_timer.cpp')
-rw-r--r-- | src/gsm_timer.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gsm_timer.cpp b/src/gsm_timer.cpp index 95513b47..d3c59cbc 100644 --- a/src/gsm_timer.cpp +++ b/src/gsm_timer.cpp @@ -33,9 +33,21 @@ static int *nearest_p; #include <limits.h> #include <gsm_timer.h> #include <pcu_l1_if.h> +#include <bts.h> + static struct rb_root timer_root = RB_ROOT; +/* + * TODO: make this depend on the BTS. This means that + * all time functions schedule based on the BTS they + * are scheduled on. + */ +static int get_current_fn() +{ + return BTS::main_bts()->current_frame_number(); +} + static void __add_gsm_timer(struct osmo_gsm_timer_list *timer) { struct rb_node **new_node = &(timer_root.rb_node); |