summaryrefslogtreecommitdiffstats
path: root/apps/osmocomBB/osmocomBB/include/layer1/sched_gsmtime.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/osmocomBB/osmocomBB/include/layer1/sched_gsmtime.h')
-rw-r--r--apps/osmocomBB/osmocomBB/include/layer1/sched_gsmtime.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/apps/osmocomBB/osmocomBB/include/layer1/sched_gsmtime.h b/apps/osmocomBB/osmocomBB/include/layer1/sched_gsmtime.h
new file mode 100644
index 0000000000..c40359eaff
--- /dev/null
+++ b/apps/osmocomBB/osmocomBB/include/layer1/sched_gsmtime.h
@@ -0,0 +1,24 @@
+#ifndef _L1_SCHED_GSMTIME_H
+#define _L1_SCHED_GSMTIME_H
+
+#include <stdint.h>
+#include <osmocom/core/linuxlist.h>
+
+struct sched_gsmtime_event {
+ struct llist_head list;
+ const struct tdma_sched_item *si;
+ uint32_t fn;
+ uint16_t p3; /* parameter for TDMA scheduler */
+};
+
+/* initialize the GSMTIME scheduler */
+void sched_gsmtime_init(void);
+
+/* Scheduling of a single event at a givnen GSM time */
+int sched_gsmtime(const struct tdma_sched_item *si, uint32_t fn, uint16_t p3);
+
+/* execute all GSMTIME one-shot events pending for 'current_fn' */
+int sched_gsmtime_execute(uint32_t current_fn);
+
+void sched_gsmtime_reset(void);
+#endif