[PATCH 1/6] src: use namespace prefix osmo_timer*

pablo at gnumonks.org pablo at gnumonks.org
Sun May 15 13:14:21 UTC 2011


From: Pablo Neira Ayuso <pablo at gnumonks.org>

Summary of changes:

s/struct timer_list/struct osmo_timer_list/g
s/bsc_add_timer/osmo_timer_add/g
s/bsc_schedule_timer/osmo_timer_schedule/g
s/bsc_del_timer/osmo_timer_del/g
s/bsc_timer_pending/osmo_timer_pending/g
s/bsc_nearest_timer/osmo_timers_nearest/g
s/bsc_prepare_timers/osmo_timers_prepare/g
s/bsc_update_timers/osmo_timers_update/g
s/bsc_timer_check/osmo_timers_check/g
---
 src/host/layer23/include/osmocom/bb/common/lapdm.h |    2 +-
 .../layer23/include/osmocom/bb/mobile/gsm322.h     |    4 +-
 .../layer23/include/osmocom/bb/mobile/gsm48_mm.h   |    4 +-
 .../layer23/include/osmocom/bb/mobile/gsm48_rr.h   |   16 +++---
 src/host/layer23/include/osmocom/bb/mobile/mncc.h  |    2 +-
 .../include/osmocom/bb/mobile/transaction.h        |    4 +-
 src/host/layer23/src/common/lapdm.c                |   42 ++++++++--------
 src/host/layer23/src/misc/app_echo_test.c          |    6 +-
 src/host/layer23/src/misc/bcch_scan.c              |    4 +-
 src/host/layer23/src/misc/cell_log.c               |    8 ++--
 src/host/layer23/src/mobile/gsm322.c               |   12 ++--
 src/host/layer23/src/mobile/gsm48_cc.c             |    6 +-
 src/host/layer23/src/mobile/gsm48_mm.c             |   48 +++++++++---------
 src/host/layer23/src/mobile/gsm48_rr.c             |   50 ++++++++++----------
 src/host/layer23/src/mobile/mnccms.c               |    6 +-
 src/host/osmocon/osmocon.c                         |   18 ++++----
 src/host/osmocon/osmoload.c                        |    8 ++--
 src/target/firmware/comm/timer.c                   |   16 +++---
 src/target/firmware/include/comm/timer.h           |   12 ++--
 19 files changed, 134 insertions(+), 134 deletions(-)

diff --git a/src/host/layer23/include/osmocom/bb/common/lapdm.h b/src/host/layer23/include/osmocom/bb/common/lapdm.h
index 2d0e2fd..b502ffd 100644
--- a/src/host/layer23/include/osmocom/bb/common/lapdm.h
+++ b/src/host/layer23/include/osmocom/bb/common/lapdm.h
@@ -42,7 +42,7 @@ struct lapdm_datalink {
 	uint32_t state;
 	int seq_err_cond; /* condition of sequence error */
 	uint8_t own_busy, peer_busy;
-	struct timer_list t200;
+	struct osmo_timer_list t200;
 	uint8_t retrans_ctr;
 	struct llist_head send_queue; /* frames from L3 */
 	struct msgb *send_buffer; /* current frame transmitting */
diff --git a/src/host/layer23/include/osmocom/bb/mobile/gsm322.h b/src/host/layer23/include/osmocom/bb/mobile/gsm322.h
index 467ff39..c93e8fa 100644
--- a/src/host/layer23/include/osmocom/bb/mobile/gsm322.h
+++ b/src/host/layer23/include/osmocom/bb/mobile/gsm322.h
@@ -119,7 +119,7 @@ struct gsm322_plmn {
 	struct llist_head	sorted_plmn; /* list of sorted PLMN */
 	struct llist_head	forbidden_la; /* forbidden LAs */
 
-	struct timer_list	timer;
+	struct osmo_timer_list	timer;
 
 	int			plmn_curr; /* current index in sorted_plmn */
 	uint16_t		mcc, mnc; /* current network selected */
@@ -140,7 +140,7 @@ struct gsm322_cellsel {
 	struct llist_head	event_queue; /* event messages */
 	struct llist_head	ba_list; /* BCCH Allocation per PLMN */
 
-	struct timer_list	timer;
+	struct osmo_timer_list	timer;
 
 	uint16_t		mcc, mnc; /* current network to search for */
 	struct gsm322_cs_list	list[1024]; /* cell selection list per freq. */
diff --git a/src/host/layer23/include/osmocom/bb/mobile/gsm48_mm.h b/src/host/layer23/include/osmocom/bb/mobile/gsm48_mm.h
index 447dc95..021b78d 100644
--- a/src/host/layer23/include/osmocom/bb/mobile/gsm48_mm.h
+++ b/src/host/layer23/include/osmocom/bb/mobile/gsm48_mm.h
@@ -163,8 +163,8 @@ struct gsm48_mmlayer {
 	struct llist_head       event_queue;
 
 	/* timers */
-	struct timer_list	t3210, t3211, t3212, t3213;
-	struct timer_list	t3220, t3230, t3240;
+	struct osmo_timer_list	t3210, t3211, t3212, t3213;
+	struct osmo_timer_list	t3220, t3230, t3240;
 	int			t3212_value;
 	int			start_t3211; /* remember to start timer */
 
diff --git a/src/host/layer23/include/osmocom/bb/mobile/gsm48_rr.h b/src/host/layer23/include/osmocom/bb/mobile/gsm48_rr.h
index b140c18..cccf279 100644
--- a/src/host/layer23/include/osmocom/bb/mobile/gsm48_rr.h
+++ b/src/host/layer23/include/osmocom/bb/mobile/gsm48_rr.h
@@ -118,15 +118,15 @@ struct gsm48_rrlayer {
 	struct llist_head       downqueue;
 
 	/* timers */
-	struct timer_list	t_starting; /* starting time for chan. access */
-	struct timer_list	t_rel_wait; /* wait for L2 to transmit UA */
-	struct timer_list	t3110;
-	struct timer_list	t3122;
-	struct timer_list	t3124;
-	struct timer_list	t3126;
+	struct osmo_timer_list	t_starting; /* starting time for chan. access */
+	struct osmo_timer_list	t_rel_wait; /* wait for L2 to transmit UA */
+	struct osmo_timer_list	t3110;
+	struct osmo_timer_list	t3122;
+	struct osmo_timer_list	t3124;
+	struct osmo_timer_list	t3126;
 	int			t3126_value;
 #ifndef TODO
-	struct timer_list	temp_rach_ti; /* temporary timer */
+	struct osmo_timer_list	temp_rach_ti; /* temporary timer */
 #endif
 
 	/* states if RR-EST-REQ was used */
@@ -169,7 +169,7 @@ struct gsm48_rrlayer {
 	uint32_t		ba_range[16];
 
 	/* measurements */
-	struct timer_list	t_meas;
+	struct osmo_timer_list	t_meas;
 	struct gsm48_rr_meas	meas;
 	uint8_t			monitor;
 };
diff --git a/src/host/layer23/include/osmocom/bb/mobile/mncc.h b/src/host/layer23/include/osmocom/bb/mobile/mncc.h
index e378ecc..a2b48cf 100644
--- a/src/host/layer23/include/osmocom/bb/mobile/mncc.h
+++ b/src/host/layer23/include/osmocom/bb/mobile/mncc.h
@@ -40,7 +40,7 @@ struct gsm_call {
 	uint8_t			hold; /* call on hold */
 	uint8_t			ring; /* call ringing/knocking */
 
-	struct timer_list	dtmf_timer;
+	struct osmo_timer_list	dtmf_timer;
 	uint8_t			dtmf_state;
 	uint8_t			dtmf_index;
 	char			dtmf[32]; /* dtmf sequence */
diff --git a/src/host/layer23/include/osmocom/bb/mobile/transaction.h b/src/host/layer23/include/osmocom/bb/mobile/transaction.h
index 6cbc25b..aa62f46 100644
--- a/src/host/layer23/include/osmocom/bb/mobile/transaction.h
+++ b/src/host/layer23/include/osmocom/bb/mobile/transaction.h
@@ -35,7 +35,7 @@ struct gsm_trans {
 			/* current timer and message queue */
 			int Tcurrent;		/* current CC timer */
 			int T308_second;	/* used to send release again */
-			struct timer_list timer;
+			struct osmo_timer_list timer;
 			struct gsm_mncc msg;	/* stores setup/disconnect/release message */
 		} cc;
 #if 0
@@ -43,7 +43,7 @@ struct gsm_trans {
 			uint8_t link_id;	/* RSL Link ID to be used for this trans */
 			int is_mt;	/* is this a MO (0) or MT (1) transfer */
 			enum gsm411_cp_state cp_state;
-			struct timer_list cp_timer;
+			struct osmo_timer_list cp_timer;
 
 			enum gsm411_rp_state rp_state;
 
diff --git a/src/host/layer23/src/common/lapdm.c b/src/host/layer23/src/common/lapdm.c
index 61e2287..974c34c 100644
--- a/src/host/layer23/src/common/lapdm.c
+++ b/src/host/layer23/src/common/lapdm.c
@@ -538,7 +538,7 @@ static void lapdm_t200_cb(void *data)
 		/* increment re-transmission counter */
 		dl->retrans_ctr++;
 		/* restart T200 (PH-READY-TO-SEND) */
-		bsc_schedule_timer(&dl->t200, T200);
+		osmo_timer_schedule(&dl->t200, T200);
 		break;
 	case LAPDm_STATE_DISC_SENT:
 		/* 5.4.4.3 */
@@ -562,7 +562,7 @@ static void lapdm_t200_cb(void *data)
 		/* increment re-transmission counter */
 		dl->retrans_ctr++;
 		/* restart T200 (PH-READY-TO-SEND) */
-		bsc_schedule_timer(&dl->t200, T200);
+		osmo_timer_schedule(&dl->t200, T200);
 		break;
 	case LAPDm_STATE_MF_EST:
 		/* 5.5.7 */
@@ -608,7 +608,7 @@ static void lapdm_t200_cb(void *data)
 				}
 			}
 			/* restart T200 (PH-READY-TO-SEND) */
-			bsc_schedule_timer(&dl->t200, T200);
+			osmo_timer_schedule(&dl->t200, T200);
 		} else {
 			/* send MDL ERROR INIDCATION to L3 */
 			rsl_rll_error(RLL_CAUSE_T200_EXPIRED, &dl->mctx);
@@ -652,7 +652,7 @@ static void lapdm_acknowledge(struct lapdm_msg_ctx *mctx)
 		 || (rej && nr == dl->V_ack)) {
 			LOGP(DLAPDM, LOGL_INFO, "reset t200\n");
 		 	t200_reset = 1;
-			bsc_del_timer(&dl->t200);
+			osmo_timer_del(&dl->t200);
 			/* 5.5.3.1 Note 1 + 2 imply timer recovery cond. */
 		}
 		/* 5.7.4: N(R) sequence error
@@ -674,7 +674,7 @@ static void lapdm_acknowledge(struct lapdm_msg_ctx *mctx)
 		if (dl->tx_length[dl->V_send - 1]) {
 			LOGP(DLAPDM, LOGL_INFO, "start T200, due to unacked I "
 				"frame(s)\n");
-			bsc_schedule_timer(&dl->t200, T200);
+			osmo_timer_schedule(&dl->t200, T200);
 		}
 	}
 }
@@ -748,7 +748,7 @@ static int lapdm_rx_u(struct msgb *msg, struct lapdm_msg_ctx *mctx)
 			/* 5.4.6.2 send DM with F=P */
 			lapdm_send_dm(mctx);
 			/* reset Timer T200 */
-			bsc_del_timer(&dl->t200);
+			osmo_timer_del(&dl->t200);
 			msgb_free(msg);
 			return send_rll_simple(RSL_MT_REL_CONF, mctx);
 		default:
@@ -821,7 +821,7 @@ static int lapdm_rx_u(struct msgb *msg, struct lapdm_msg_ctx *mctx)
 			break;
 		case LAPDm_STATE_DISC_SENT:
 			/* reset Timer T200 */
-			bsc_del_timer(&dl->t200);
+			osmo_timer_del(&dl->t200);
 			/* go to idle state */
 			lapdm_dl_newstate(dl, LAPDm_STATE_IDLE);
 			rc = send_rll_simple(RSL_MT_REL_CONF, mctx);
@@ -836,7 +836,7 @@ static int lapdm_rx_u(struct msgb *msg, struct lapdm_msg_ctx *mctx)
 			return 0;
 		}
 		/* reset T200 */
-		bsc_del_timer(&dl->t200);
+		osmo_timer_del(&dl->t200);
 		rc = send_rll_simple(RSL_MT_REL_IND, mctx);
 		msgb_free(msg);
 		break;
@@ -933,7 +933,7 @@ static int lapdm_rx_u(struct msgb *msg, struct lapdm_msg_ctx *mctx)
 			/* 5.4.6.2 send DM with F=P */
 			lapdm_send_dm(mctx);
 			/* reset Timer T200 */
-			bsc_del_timer(&dl->t200);
+			osmo_timer_del(&dl->t200);
 			return send_rll_simple(RSL_MT_REL_IND, mctx);
 		case LAPDm_STATE_MF_EST:
 		case LAPDm_STATE_TIMER_RECOV:
@@ -950,7 +950,7 @@ static int lapdm_rx_u(struct msgb *msg, struct lapdm_msg_ctx *mctx)
 		/* send UA response */
 		lapdm_send_ua(mctx, length, msg->l2h + 3);
 		/* reset Timer T200 */
-		bsc_del_timer(&dl->t200);
+		osmo_timer_del(&dl->t200);
 		/* enter idle state */
 		lapdm_dl_newstate(dl, LAPDm_STATE_IDLE);
 		/* send notification to L3 */
@@ -999,7 +999,7 @@ static int lapdm_rx_u(struct msgb *msg, struct lapdm_msg_ctx *mctx)
 		case LAPDm_STATE_DISC_SENT:
 			LOGP(DLAPDM, LOGL_INFO, "UA in disconnect state\n");
 			/* reset Timer T200 */
-			bsc_del_timer(&dl->t200);
+			osmo_timer_del(&dl->t200);
 			/* go to idle state */
 			lapdm_dl_newstate(dl, LAPDm_STATE_IDLE);
 			rc = send_rll_simple(RSL_MT_REL_CONF, mctx);
@@ -1015,7 +1015,7 @@ static int lapdm_rx_u(struct msgb *msg, struct lapdm_msg_ctx *mctx)
 		}
 		LOGP(DLAPDM, LOGL_INFO, "UA in SABM state\n");
 		/* reset Timer T200 */
-		bsc_del_timer(&dl->t200);
+		osmo_timer_del(&dl->t200);
 		/* compare UA with SABME if contention resolution is applied */
 		if (dl->tx_hist[0][2] >> 2) {
 			rc = check_length_ind(mctx, msg->l2h[2]);
@@ -1135,7 +1135,7 @@ static int lapdm_rx_s(struct msgb *msg, struct lapdm_msg_ctx *mctx)
 			/* V(S) to the N(R) in the RR frame */
 			dl->V_send = LAPDm_CTRL_Nr(mctx->ctrl);
 			/* reset Timer T200 */
-			bsc_del_timer(&dl->t200);
+			osmo_timer_del(&dl->t200);
 			/* 5.5.7 Clear timer recovery condition */
 			lapdm_dl_newstate(dl, LAPDm_STATE_MF_EST);
 		}
@@ -1198,7 +1198,7 @@ static int lapdm_rx_s(struct msgb *msg, struct lapdm_msg_ctx *mctx)
 			/* V(S) and V(A) to the N(R) in the REJ frame */
 			dl->V_send = dl->V_ack = LAPDm_CTRL_Nr(mctx->ctrl);
 			/* reset Timer T200 */
-			bsc_del_timer(&dl->t200);
+			osmo_timer_del(&dl->t200);
 			/* 5.5.3.2 */
 			if (LAPDm_ADDR_CR(mctx->addr) == CR_BS2MS_CMD
 			 && LAPDm_CTRL_PF_BIT(mctx->ctrl)) {
@@ -1246,7 +1246,7 @@ static int lapdm_rx_s(struct msgb *msg, struct lapdm_msg_ctx *mctx)
 			/* V(S) and V(A) to the N(R) in the REJ frame */
 			dl->V_send = dl->V_ack = LAPDm_CTRL_Nr(mctx->ctrl);
 			/* reset Timer T200 */
-			bsc_del_timer(&dl->t200);
+			osmo_timer_del(&dl->t200);
 		} else {
 			/* Clear an existing peer receiver busy condition */
 			dl->peer_busy = 0;
@@ -1660,7 +1660,7 @@ static int rslms_rx_rll_est_req(struct msgb *msg, struct lapdm_datalink *dl)
 	lapdm_dl_newstate(dl, LAPDm_STATE_SABM_SENT);
 
 	/* Tramsmit and start T200 */
-	bsc_schedule_timer(&dl->t200, T200);
+	osmo_timer_schedule(&dl->t200, T200);
 	return tx_ph_data_enqueue(dl, msg, chan_nr, link_id, n201);
 }
 
@@ -1853,8 +1853,8 @@ static int rslms_send_i(struct lapdm_msg_ctx *mctx, int line)
 	/* If timer T200 is not running at the time right before transmitting a
 	 * frame, when the PH-READY-TO-SEND primitive is received from the
 	 * physical layer., it shall be set. */
-	if (!bsc_timer_pending(&dl->t200))
-		bsc_schedule_timer(&dl->t200, T200);
+	if (!osmo_timer_pending(&dl->t200))
+		osmo_timer_schedule(&dl->t200, T200);
 
 	tx_ph_data_enqueue(dl, msg, chan_nr, link_id, mctx->n201);
 
@@ -1957,7 +1957,7 @@ static int rslms_rx_rll_res_req(struct msgb *msg, struct lapdm_datalink *dl)
 	lapdm_dl_newstate(dl, LAPDm_STATE_SABM_SENT);
 
 	/* Tramsmit and start T200 */
-	bsc_schedule_timer(&dl->t200, T200);
+	osmo_timer_schedule(&dl->t200, T200);
 	return tx_ph_data_enqueue(dl, msg, chan_nr, link_id, n201);
 }
 
@@ -1979,7 +1979,7 @@ static int rslms_rx_rll_rel_req(struct msgb *msg, struct lapdm_datalink *dl)
 		LOGP(DLAPDM, LOGL_INFO, "perform local release\n");
 		msgb_free(msg);
 		/* reset Timer T200 */
-		bsc_del_timer(&dl->t200);
+		osmo_timer_del(&dl->t200);
 		/* enter idle state */
 		lapdm_dl_newstate(dl, LAPDm_STATE_IDLE);
 		/* flush buffers */
@@ -2013,7 +2013,7 @@ static int rslms_rx_rll_rel_req(struct msgb *msg, struct lapdm_datalink *dl)
 	lapdm_dl_newstate(dl, LAPDm_STATE_DISC_SENT);
 
 	/* Tramsmit and start T200 */
-	bsc_schedule_timer(&dl->t200, T200);
+	osmo_timer_schedule(&dl->t200, T200);
 	return tx_ph_data_enqueue(dl, msg, chan_nr, link_id, dl->mctx.n201);
 }
 
diff --git a/src/host/layer23/src/misc/app_echo_test.c b/src/host/layer23/src/misc/app_echo_test.c
index 0adab7f..3d937d2 100644
--- a/src/host/layer23/src/misc/app_echo_test.c
+++ b/src/host/layer23/src/misc/app_echo_test.c
@@ -34,7 +34,7 @@
 
 
 static struct {
-	struct timer_list timer;
+	struct osmo_timer_list timer;
 } test_data;
 
 static void test_tmr_cb(void *data)
@@ -42,7 +42,7 @@ static void test_tmr_cb(void *data)
 	struct osmocom_ms *ms = data;
 
 	l1ctl_tx_echo_req(ms, 62);
-	bsc_schedule_timer(&test_data.timer, 1, 0);
+	osmo_timer_schedule(&test_data.timer, 1, 0);
 }
 
 int l23_app_init(struct osmocom_ms *ms)
@@ -50,7 +50,7 @@ int l23_app_init(struct osmocom_ms *ms)
 	test_data.timer.cb = &test_tmr_cb;
 	test_data.timer.data = ms;
 
-	bsc_schedule_timer(&test_data.timer, 1, 0);
+	osmo_timer_schedule(&test_data.timer, 1, 0);
 
 	return 0;
 }
diff --git a/src/host/layer23/src/misc/bcch_scan.c b/src/host/layer23/src/misc/bcch_scan.c
index 351da52..fc88254 100644
--- a/src/host/layer23/src/misc/bcch_scan.c
+++ b/src/host/layer23/src/misc/bcch_scan.c
@@ -105,7 +105,7 @@ struct full_power_scan {
 	struct llist_head cell_list;
 	struct cell_info *cur_cell;
 	uint16_t cur_arfcn;
-	struct timer_list timer;
+	struct osmo_timer_list timer;
 };
 
 static struct full_power_scan fps;
@@ -164,7 +164,7 @@ static int _cinfo_start_arfcn(unsigned int band_arfcn)
 	fps.cur_cell->band_arfcn = band_arfcn;
 	/* FIXME: start timer in case we never get a sync */
 	fps.state = BSCAN_S_WAIT_DATA;
-	bsc_schedule_timer(&fps.timer, 2, 0);
+	osmo_timer_schedule(&fps.timer, 2, 0);
 
 	return 0;
 }
diff --git a/src/host/layer23/src/misc/cell_log.c b/src/host/layer23/src/misc/cell_log.c
index 7980082..a1a764b 100644
--- a/src/host/layer23/src/misc/cell_log.c
+++ b/src/host/layer23/src/misc/cell_log.c
@@ -71,7 +71,7 @@ static uint16_t band_range[][2] = {{0, 124}, {512, 885}, {955, 1023}, {0, 0}};
 #define INFO_FLG_SI4	128
 
 static struct osmocom_ms *ms;
-static struct timer_list timer;
+static struct osmo_timer_list timer;
 
 static struct pm_info {
 	uint16_t flags;
@@ -233,8 +233,8 @@ static void timeout_cb(void *arg)
 
 static void stop_timer(void)
 {
-	if (bsc_timer_pending(&timer))
-		bsc_del_timer(&timer);
+	if (osmo_timer_pending(&timer))
+		osmo_timer_del(&timer);
 }
 
 static void start_timer(int sec, int micro)
@@ -242,7 +242,7 @@ static void start_timer(int sec, int micro)
 	stop_timer();
 	timer.cb = timeout_cb;
 	timer.data = ms;
-	bsc_schedule_timer(&timer, sec, micro);
+	osmo_timer_schedule(&timer, sec, micro);
 }
 
 static void start_rach(void)
diff --git a/src/host/layer23/src/mobile/gsm322.c b/src/host/layer23/src/mobile/gsm322.c
index c05469d..2bd4f9c 100644
--- a/src/host/layer23/src/mobile/gsm322.c
+++ b/src/host/layer23/src/mobile/gsm322.c
@@ -426,15 +426,15 @@ static void start_plmn_timer(struct gsm322_plmn *plmn, int secs)
 		secs / 60);
 	plmn->timer.cb = plmn_timer_timeout;
 	plmn->timer.data = plmn;
-	bsc_schedule_timer(&plmn->timer, secs, 0);
+	osmo_timer_schedule(&plmn->timer, secs, 0);
 }
 
 /* stop plmn search timer */
 static void stop_plmn_timer(struct gsm322_plmn *plmn)
 {
-	if (bsc_timer_pending(&plmn->timer)) {
+	if (osmo_timer_pending(&plmn->timer)) {
 		LOGP(DPLMN, LOGL_INFO, "Stopping pending timer.\n");
-		bsc_del_timer(&plmn->timer);
+		osmo_timer_del(&plmn->timer);
 	}
 }
 
@@ -444,15 +444,15 @@ void start_cs_timer(struct gsm322_cellsel *cs, int sec, int micro)
 	LOGP(DCS, LOGL_DEBUG, "Starting CS timer with %d seconds.\n", sec);
 	cs->timer.cb = gsm322_cs_timeout;
 	cs->timer.data = cs;
-	bsc_schedule_timer(&cs->timer, sec, micro);
+	osmo_timer_schedule(&cs->timer, sec, micro);
 }
 
 /* stop cell selection timer */
 static void stop_cs_timer(struct gsm322_cellsel *cs)
 {
-	if (bsc_timer_pending(&cs->timer)) {
+	if (osmo_timer_pending(&cs->timer)) {
 		LOGP(DCS, LOGL_DEBUG, "stopping pending CS timer.\n");
-		bsc_del_timer(&cs->timer);
+		osmo_timer_del(&cs->timer);
 	}
 }
 
diff --git a/src/host/layer23/src/mobile/gsm48_cc.c b/src/host/layer23/src/mobile/gsm48_cc.c
index b881205..5abf3f8 100644
--- a/src/host/layer23/src/mobile/gsm48_cc.c
+++ b/src/host/layer23/src/mobile/gsm48_cc.c
@@ -338,17 +338,17 @@ static void gsm48_start_cc_timer(struct gsm_trans *trans, int current,
 		sec);
 	trans->cc.timer.cb = gsm48_cc_timeout;
 	trans->cc.timer.data = trans;
-	bsc_schedule_timer(&trans->cc.timer, sec, micro);
+	osmo_timer_schedule(&trans->cc.timer, sec, micro);
 	trans->cc.Tcurrent = current;
 }
 
 /* stop various timers */
 static void gsm48_stop_cc_timer(struct gsm_trans *trans)
 {
-	if (bsc_timer_pending(&trans->cc.timer)) {
+	if (osmo_timer_pending(&trans->cc.timer)) {
 		LOGP(DCC, LOGL_INFO, "stopping pending timer T%x\n",
 			trans->cc.Tcurrent);
-		bsc_del_timer(&trans->cc.timer);
+		osmo_timer_del(&trans->cc.timer);
 		trans->cc.Tcurrent = 0;
 	}
 }
diff --git a/src/host/layer23/src/mobile/gsm48_mm.c b/src/host/layer23/src/mobile/gsm48_mm.c
index bf5bbc2..140750a 100644
--- a/src/host/layer23/src/mobile/gsm48_mm.c
+++ b/src/host/layer23/src/mobile/gsm48_mm.c
@@ -382,7 +382,7 @@ static void start_mm_t3210(struct gsm48_mmlayer *mm)
 		"seconds\n", GSM_T3210_MS);
 	mm->t3210.cb = timeout_mm_t3210;
 	mm->t3210.data = mm;
-	bsc_schedule_timer(&mm->t3210, GSM_T3210_MS);
+	osmo_timer_schedule(&mm->t3210, GSM_T3210_MS);
 }
 
 static void start_mm_t3211(struct gsm48_mmlayer *mm)
@@ -391,7 +391,7 @@ static void start_mm_t3211(struct gsm48_mmlayer *mm)
 		"%d.%d seconds\n", GSM_T3211_MS);
 	mm->t3211.cb = timeout_mm_t3211;
 	mm->t3211.data = mm;
-	bsc_schedule_timer(&mm->t3211, GSM_T3211_MS);
+	osmo_timer_schedule(&mm->t3211, GSM_T3211_MS);
 }
 
 static void start_mm_t3212(struct gsm48_mmlayer *mm, int sec)
@@ -404,7 +404,7 @@ static void start_mm_t3212(struct gsm48_mmlayer *mm, int sec)
 		"%d seconds\n", sec);
 	mm->t3212.cb = timeout_mm_t3212;
 	mm->t3212.data = mm;
-	bsc_schedule_timer(&mm->t3212, sec, 0);
+	osmo_timer_schedule(&mm->t3212, sec, 0);
 }
 
 static void start_mm_t3213(struct gsm48_mmlayer *mm)
@@ -413,7 +413,7 @@ static void start_mm_t3213(struct gsm48_mmlayer *mm)
 		"%d.%d seconds\n", GSM_T3213_MS);
 	mm->t3213.cb = timeout_mm_t3213;
 	mm->t3213.data = mm;
-	bsc_schedule_timer(&mm->t3213, GSM_T3213_MS);
+	osmo_timer_schedule(&mm->t3213, GSM_T3213_MS);
 }
 
 static void start_mm_t3220(struct gsm48_mmlayer *mm)
@@ -422,7 +422,7 @@ static void start_mm_t3220(struct gsm48_mmlayer *mm)
 		"%d.%d seconds\n", GSM_T3220_MS);
 	mm->t3220.cb = timeout_mm_t3220;
 	mm->t3220.data = mm;
-	bsc_schedule_timer(&mm->t3220, GSM_T3220_MS);
+	osmo_timer_schedule(&mm->t3220, GSM_T3220_MS);
 }
 
 static void start_mm_t3230(struct gsm48_mmlayer *mm)
@@ -431,7 +431,7 @@ static void start_mm_t3230(struct gsm48_mmlayer *mm)
 		"%d.%d seconds\n", GSM_T3230_MS);
 	mm->t3230.cb = timeout_mm_t3230;
 	mm->t3230.data = mm;
-	bsc_schedule_timer(&mm->t3230, GSM_T3230_MS);
+	osmo_timer_schedule(&mm->t3230, GSM_T3230_MS);
 }
 
 static void start_mm_t3240(struct gsm48_mmlayer *mm)
@@ -440,69 +440,69 @@ static void start_mm_t3240(struct gsm48_mmlayer *mm)
 		"seconds\n", GSM_T3240_MS);
 	mm->t3240.cb = timeout_mm_t3240;
 	mm->t3240.data = mm;
-	bsc_schedule_timer(&mm->t3240, GSM_T3240_MS);
+	osmo_timer_schedule(&mm->t3240, GSM_T3240_MS);
 }
 
 static void stop_mm_t3210(struct gsm48_mmlayer *mm)
 {
-	if (bsc_timer_pending(&mm->t3210)) {
+	if (osmo_timer_pending(&mm->t3210)) {
 		LOGP(DMM, LOGL_INFO, "stopping pending (loc. upd. timeout) "
 			"timer T3210\n");
-		bsc_del_timer(&mm->t3210);
+		osmo_timer_del(&mm->t3210);
 	}
 }
 
 static void stop_mm_t3211(struct gsm48_mmlayer *mm)
 {
-	if (bsc_timer_pending(&mm->t3211)) {
+	if (osmo_timer_pending(&mm->t3211)) {
 		LOGP(DMM, LOGL_INFO, "stopping pending (loc. upd. retry "
 			"delay) timer T3211\n");
-		bsc_del_timer(&mm->t3211);
+		osmo_timer_del(&mm->t3211);
 	}
 }
 
 static void stop_mm_t3212(struct gsm48_mmlayer *mm)
 {
-	if (bsc_timer_pending(&mm->t3212)) {
+	if (osmo_timer_pending(&mm->t3212)) {
 		LOGP(DMM, LOGL_INFO, "stopping pending (periodic loc. upd. "
 			"delay) timer T3212\n");
-		bsc_del_timer(&mm->t3212);
+		osmo_timer_del(&mm->t3212);
 	}
 }
 
 static void stop_mm_t3213(struct gsm48_mmlayer *mm)
 {
-	if (bsc_timer_pending(&mm->t3213)) {
+	if (osmo_timer_pending(&mm->t3213)) {
 		LOGP(DMM, LOGL_INFO, "stopping pending (delay after RA "
 			"failure) timer T3213\n");
-		bsc_del_timer(&mm->t3213);
+		osmo_timer_del(&mm->t3213);
 	}
 }
 
 static void stop_mm_t3220(struct gsm48_mmlayer *mm)
 {
-	if (bsc_timer_pending(&mm->t3220)) {
+	if (osmo_timer_pending(&mm->t3220)) {
 		LOGP(DMM, LOGL_INFO, "stopping pending (IMSI detach keepalive) "
 			"timer T3220\n");
-		bsc_del_timer(&mm->t3220);
+		osmo_timer_del(&mm->t3220);
 	}
 }
 
 static void stop_mm_t3230(struct gsm48_mmlayer *mm)
 {
-	if (bsc_timer_pending(&mm->t3230)) {
+	if (osmo_timer_pending(&mm->t3230)) {
 		LOGP(DMM, LOGL_INFO, "stopping pending (MM connection timeout) "
 			"timer T3230\n");
-		bsc_del_timer(&mm->t3230);
+		osmo_timer_del(&mm->t3230);
 	}
 }
 
 static void stop_mm_t3240(struct gsm48_mmlayer *mm)
 {
-	if (bsc_timer_pending(&mm->t3240)) {
+	if (osmo_timer_pending(&mm->t3240)) {
 		LOGP(DMM, LOGL_INFO, "stopping pending (RR release timeout) "
 			"timer T3240\n");
-		bsc_del_timer(&mm->t3240);
+		osmo_timer_del(&mm->t3240);
 	}
 }
 
@@ -920,7 +920,7 @@ static void new_mm_state(struct gsm48_mmlayer *mm, int state, int substate)
 	 && (substate == GSM48_MM_SST_NORMAL_SERVICE
 	  || substate == GSM48_MM_SST_ATTEMPT_UPDATE)) {
 	  	/* start periodic location update timer */
-		if (!bsc_timer_pending(&mm->t3212))
+		if (!osmo_timer_pending(&mm->t3212))
 			start_mm_t3212(mm, mm->t3212_value);
 		/* perform pending location update */
 		if (mm->lupd_retry) {
@@ -1954,7 +1954,7 @@ static int gsm48_mm_sysinfo(struct osmocom_ms *ms, struct msgb *msg)
 
 	/* new periodic location update timer timeout */
 	if (s->t3212 && s->t3212 != mm->t3212_value) {
-		if (bsc_timer_pending(&mm->t3212)) {
+		if (osmo_timer_pending(&mm->t3212)) {
 			int t;
 			struct timeval current_time;
 
@@ -3865,7 +3865,7 @@ static int gsm48_mm_data_ind(struct osmocom_ms *ms, struct msgb *msg)
 	stop_mm_t3212(mm); /* 4.4.2 */
 
 	/* 11.2 re-start pending RR release timer */
-	if (bsc_timer_pending(&mm->t3240)) {
+	if (osmo_timer_pending(&mm->t3240)) {
 		stop_mm_t3240(mm);
 		start_mm_t3240(mm);
 	}
diff --git a/src/host/layer23/src/mobile/gsm48_rr.c b/src/host/layer23/src/mobile/gsm48_rr.c
index b2ab2e1..c1c27f4 100644
--- a/src/host/layer23/src/mobile/gsm48_rr.c
+++ b/src/host/layer23/src/mobile/gsm48_rr.c
@@ -711,7 +711,7 @@ static void start_rr_t_meas(struct gsm48_rrlayer *rr, int sec, int micro)
 {
 	rr->t_meas.cb = timeout_rr_meas;
 	rr->t_meas.data = rr;
-	bsc_schedule_timer(&rr->t_meas, sec, micro);
+	osmo_timer_schedule(&rr->t_meas, sec, micro);
 }
 
 static void start_rr_t_rel_wait(struct gsm48_rrlayer *rr, int sec, int micro)
@@ -720,7 +720,7 @@ static void start_rr_t_rel_wait(struct gsm48_rrlayer *rr, int sec, int micro)
 		micro / 1000);
 	rr->t_rel_wait.cb = timeout_rr_t_rel_wait;
 	rr->t_rel_wait.data = rr;
-	bsc_schedule_timer(&rr->t_rel_wait, sec, micro);
+	osmo_timer_schedule(&rr->t_rel_wait, sec, micro);
 }
 
 static void start_rr_t_starting(struct gsm48_rrlayer *rr, int sec, int micro)
@@ -729,7 +729,7 @@ static void start_rr_t_starting(struct gsm48_rrlayer *rr, int sec, int micro)
 		micro / 1000);
 	rr->t_starting.cb = timeout_rr_t_starting;
 	rr->t_starting.data = rr;
-	bsc_schedule_timer(&rr->t_starting, sec, micro);
+	osmo_timer_schedule(&rr->t_starting, sec, micro);
 }
 
 static void start_rr_t3110(struct gsm48_rrlayer *rr, int sec, int micro)
@@ -738,7 +738,7 @@ static void start_rr_t3110(struct gsm48_rrlayer *rr, int sec, int micro)
 		micro / 1000);
 	rr->t3110.cb = timeout_rr_t3110;
 	rr->t3110.data = rr;
-	bsc_schedule_timer(&rr->t3110, sec, micro);
+	osmo_timer_schedule(&rr->t3110, sec, micro);
 }
 
 static void start_rr_t3122(struct gsm48_rrlayer *rr, int sec, int micro)
@@ -747,7 +747,7 @@ static void start_rr_t3122(struct gsm48_rrlayer *rr, int sec, int micro)
 		micro / 1000);
 	rr->t3122.cb = timeout_rr_t3122;
 	rr->t3122.data = rr;
-	bsc_schedule_timer(&rr->t3122, sec, micro);
+	osmo_timer_schedule(&rr->t3122, sec, micro);
 }
 
 static void start_rr_t3124(struct gsm48_rrlayer *rr, int sec, int micro)
@@ -756,7 +756,7 @@ static void start_rr_t3124(struct gsm48_rrlayer *rr, int sec, int micro)
 		micro / 1000);
 	rr->t3124.cb = timeout_rr_t3124;
 	rr->t3124.data = rr;
-	bsc_schedule_timer(&rr->t3124, sec, micro);
+	osmo_timer_schedule(&rr->t3124, sec, micro);
 }
 
 static void start_rr_t3126(struct gsm48_rrlayer *rr, int sec, int micro)
@@ -765,62 +765,62 @@ static void start_rr_t3126(struct gsm48_rrlayer *rr, int sec, int micro)
 		micro / 1000);
 	rr->t3126.cb = timeout_rr_t3126;
 	rr->t3126.data = rr;
-	bsc_schedule_timer(&rr->t3126, sec, micro);
+	osmo_timer_schedule(&rr->t3126, sec, micro);
 }
 
 static void stop_rr_t_meas(struct gsm48_rrlayer *rr)
 {
-	if (bsc_timer_pending(&rr->t_meas)) {
+	if (osmo_timer_pending(&rr->t_meas)) {
 		LOGP(DRR, LOGL_INFO, "stopping pending timer T_meas\n");
-		bsc_del_timer(&rr->t_meas);
+		osmo_timer_del(&rr->t_meas);
 	}
 }
 
 static void stop_rr_t_starting(struct gsm48_rrlayer *rr)
 {
-	if (bsc_timer_pending(&rr->t_starting)) {
+	if (osmo_timer_pending(&rr->t_starting)) {
 		LOGP(DRR, LOGL_INFO, "stopping pending timer T_starting\n");
-		bsc_del_timer(&rr->t_starting);
+		osmo_timer_del(&rr->t_starting);
 	}
 }
 
 static void stop_rr_t_rel_wait(struct gsm48_rrlayer *rr)
 {
-	if (bsc_timer_pending(&rr->t_rel_wait)) {
+	if (osmo_timer_pending(&rr->t_rel_wait)) {
 		LOGP(DRR, LOGL_INFO, "stopping pending timer T_rel_wait\n");
-		bsc_del_timer(&rr->t_rel_wait);
+		osmo_timer_del(&rr->t_rel_wait);
 	}
 }
 
 static void stop_rr_t3110(struct gsm48_rrlayer *rr)
 {
-	if (bsc_timer_pending(&rr->t3110)) {
+	if (osmo_timer_pending(&rr->t3110)) {
 		LOGP(DRR, LOGL_INFO, "stopping pending timer T3110\n");
-		bsc_del_timer(&rr->t3110);
+		osmo_timer_del(&rr->t3110);
 	}
 }
 
 static void stop_rr_t3122(struct gsm48_rrlayer *rr)
 {
-	if (bsc_timer_pending(&rr->t3122)) {
+	if (osmo_timer_pending(&rr->t3122)) {
 		LOGP(DRR, LOGL_INFO, "stopping pending timer T3122\n");
-		bsc_del_timer(&rr->t3122);
+		osmo_timer_del(&rr->t3122);
 	}
 }
 
 static void stop_rr_t3124(struct gsm48_rrlayer *rr)
 {
-	if (bsc_timer_pending(&rr->t3124)) {
+	if (osmo_timer_pending(&rr->t3124)) {
 		LOGP(DRR, LOGL_INFO, "stopping pending timer T3124\n");
-		bsc_del_timer(&rr->t3124);
+		osmo_timer_del(&rr->t3124);
 	}
 }
 
 static void stop_rr_t3126(struct gsm48_rrlayer *rr)
 {
-	if (bsc_timer_pending(&rr->t3126)) {
+	if (osmo_timer_pending(&rr->t3126)) {
 		LOGP(DRR, LOGL_INFO, "stopping pending timer T3126\n");
-		bsc_del_timer(&rr->t3126);
+		osmo_timer_del(&rr->t3126);
 	}
 }
 
@@ -1454,7 +1454,7 @@ fail:
 	if (!rr->n_chan_req) {
 		LOGP(DRR, LOGL_INFO, "Done with sending RANDOM ACCESS "
 			"bursts\n");
-		if (!bsc_timer_pending(&rr->t3126))
+		if (!osmo_timer_pending(&rr->t3126))
 			start_rr_t3126(rr, 5, 0); /* TODO improve! */
 		return 0;
 	}
@@ -2494,7 +2494,7 @@ static int gsm48_rr_rx_imm_ass_rej(struct osmocom_ms *ms, struct msgb *msg)
 			if (t3122_value)
 				start_rr_t3122(rr, t3122_value, 0);
 			/* start timer 3126 if not already */
-			if (!bsc_timer_pending(&rr->t3126))
+			if (!osmo_timer_pending(&rr->t3126))
 				start_rr_t3126(rr, 5, 0); /* TODO improve! */
 			/* stop assignmnet requests */
 			rr->n_chan_req = 0;
@@ -4232,7 +4232,7 @@ static int gsm48_rr_est_req(struct osmocom_ms *ms, struct msgb *msg)
 	uint16_t acc_class;
 
 	/* 3.3.1.1.3.2 */
-	if (bsc_timer_pending(&rr->t3122)) {
+	if (osmo_timer_pending(&rr->t3122)) {
 		if (rrh->cause != RR_EST_CAUSE_EMERGENCY) {
 			LOGP(DRR, LOGL_INFO, "T3122 running, rejecting!\n");
 			cause = RR_REL_CAUSE_T3122;
@@ -5044,7 +5044,7 @@ static int gsm48_rr_rand_acc_cnf_dedicated(struct osmocom_ms *ms, struct msgb *m
 	}
 
 	/* start timer for sending next HANDOVER ACCESS bursts afterwards */
-	if (!bsc_timer_pending(&rr->t3124)) {
+	if (!osmo_timer_pending(&rr->t3124)) {
 		if (allocated channel is SDCCH)
 			start_rr_t3124(rr, GSM_T3124_675);
 		else
diff --git a/src/host/layer23/src/mobile/mnccms.c b/src/host/layer23/src/mobile/mnccms.c
index 4d47be4..8d3abe6 100644
--- a/src/host/layer23/src/mobile/mnccms.c
+++ b/src/host/layer23/src/mobile/mnccms.c
@@ -51,14 +51,14 @@ static void start_dtmf_timer(struct gsm_call *call, uint16_t ms)
 	LOGP(DCC, LOGL_INFO, "starting DTMF timer %d ms\n", ms);
 	call->dtmf_timer.cb = timeout_dtmf;
 	call->dtmf_timer.data = call;
-	bsc_schedule_timer(&call->dtmf_timer, 0, ms * 1000);
+	osmo_timer_schedule(&call->dtmf_timer, 0, ms * 1000);
 }
 
 static void stop_dtmf_timer(struct gsm_call *call)
 {
-	if (bsc_timer_pending(&call->dtmf_timer)) {
+	if (osmo_timer_pending(&call->dtmf_timer)) {
 		LOGP(DCC, LOGL_INFO, "stopping pending DTMF timer\n");
-		bsc_del_timer(&call->dtmf_timer);
+		osmo_timer_del(&call->dtmf_timer);
 	}
 }
 
diff --git a/src/host/osmocon/osmocon.c b/src/host/osmocon/osmocon.c
index 2c42799..c8ea38a 100644
--- a/src/host/osmocon/osmocon.c
+++ b/src/host/osmocon/osmocon.c
@@ -164,7 +164,7 @@ struct dnload {
 
 
 static struct dnload dnload;
-static struct timer_list tick_timer;
+static struct osmo_timer_list tick_timer;
 
 /* Compal ramloader specific */
 static const uint8_t phone_prompt1[] = { 0x1b, 0xf6, 0x02, 0x00, 0x41, 0x01, 0x40 };
@@ -290,7 +290,7 @@ static void beacon_timer_cb(void *p)
 		if (!(rc == sizeof(romload_ident_cmd)))
 			printf("Error sending identification beacon\n");
 
-		bsc_schedule_timer(p, 0, dnload.beacon_interval);
+		osmo_timer_schedule(p, 0, dnload.beacon_interval);
 	}
 }
 
@@ -305,7 +305,7 @@ static void mtk_timer_cb(void *p)
 		if (!(rc == 1))
 			printf("Error sending identification beacon\n");
 
-		bsc_schedule_timer(p, 0, dnload.beacon_interval);
+		osmo_timer_schedule(p, 0, dnload.beacon_interval);
 	}
 }
 
@@ -889,7 +889,7 @@ static int handle_read(void)
 			serial_set_baudrate(ROMLOAD_INIT_BAUDRATE);
 			tick_timer.cb = &beacon_timer_cb;
 			tick_timer.data = &tick_timer;
-			bsc_schedule_timer(&tick_timer, 0, dnload.beacon_interval);
+			osmo_timer_schedule(&tick_timer, 0, dnload.beacon_interval);
 		}
 	} else if (!memcmp(buffer, phone_nack, sizeof(phone_nack))) {
 		printf("Received DOWNLOAD NACK from phone, something went"
@@ -1004,7 +1004,7 @@ static int handle_read_romload(void)
 				"something went wrong, aborting\n");
 			serial_set_baudrate(ROMLOAD_INIT_BAUDRATE);
 			dnload.romload_state = WAITING_IDENTIFICATION;
-			bsc_schedule_timer(&tick_timer, 0, dnload.beacon_interval);
+			osmo_timer_schedule(&tick_timer, 0, dnload.beacon_interval);
 		}
 		break;
 	case WAITING_CHECKSUM_ACK:
@@ -1026,7 +1026,7 @@ static int handle_read_romload(void)
 				"match ours, aborting\n", ~buffer[2]);
 			serial_set_baudrate(ROMLOAD_INIT_BAUDRATE);
 			dnload.romload_state = WAITING_IDENTIFICATION;
-			bsc_schedule_timer(&tick_timer, 0, dnload.beacon_interval);
+			osmo_timer_schedule(&tick_timer, 0, dnload.beacon_interval);
 			bufptr -= 1;
 		}
 		break;
@@ -1043,7 +1043,7 @@ static int handle_read_romload(void)
 			printf("Received branch nack, aborting\n");
 			serial_set_baudrate(ROMLOAD_INIT_BAUDRATE);
 			dnload.romload_state = WAITING_IDENTIFICATION;
-			bsc_schedule_timer(&tick_timer, 0, dnload.beacon_interval);
+			osmo_timer_schedule(&tick_timer, 0, dnload.beacon_interval);
 		}
 		break;
 	default:
@@ -1536,14 +1536,14 @@ int main(int argc, char **argv)
 		serial_set_baudrate(ROMLOAD_INIT_BAUDRATE);
 		tick_timer.cb = &beacon_timer_cb;
 		tick_timer.data = &tick_timer;
-		bsc_schedule_timer(&tick_timer, 0, dnload.beacon_interval);
+		osmo_timer_schedule(&tick_timer, 0, dnload.beacon_interval);
 	}
 	else if (dnload.mode == MODE_MTK) {
 		tmp_load_address = MTK_ADDRESS;
 		serial_set_baudrate(MTK_INIT_BAUDRATE);
 		tick_timer.cb = &mtk_timer_cb;
 		tick_timer.data = &tick_timer;
-		bsc_schedule_timer(&tick_timer, 0, dnload.beacon_interval);
+		osmo_timer_schedule(&tick_timer, 0, dnload.beacon_interval);
 	}
 
 	dnload.load_address[0] = (tmp_load_address >> 24) & 0xff;
diff --git a/src/host/osmocon/osmoload.c b/src/host/osmocon/osmoload.c
index 6663a1e..6a31dc1 100644
--- a/src/host/osmocon/osmoload.c
+++ b/src/host/osmocon/osmoload.c
@@ -84,7 +84,7 @@ static struct {
 	uint8_t command;
 
 	/* general timeout */
-	struct timer_list timeout;
+	struct osmo_timer_list timeout;
 
 	/* binary i/o for firmware images */
 	FILE *binfile;
@@ -661,7 +661,7 @@ loader_do_memload() {
 		return;
 	}
 
-	bsc_schedule_timer(&osmoload.timeout, 0, 500000);
+	osmo_timer_schedule(&osmoload.timeout, 0, 500000);
 
 	uint8_t reqbytes = (rembytes < MEM_MSG_MAX) ? rembytes : MEM_MSG_MAX;
 
@@ -701,7 +701,7 @@ loader_do_fprogram() {
 		return;
 	}
 
-	bsc_schedule_timer(&osmoload.timeout, 0, 10000000);
+	osmo_timer_schedule(&osmoload.timeout, 0, 10000000);
 
 	uint8_t reqbytes = (rembytes < MEM_MSG_MAX) ? rembytes : MEM_MSG_MAX;
 
@@ -1143,7 +1143,7 @@ loader_command(char *name, int cmdc, char **cmdv) {
 
 	if(osmoload.state == STATE_QUERY_PENDING) {
 		osmoload.timeout.cb = &query_timeout;
-		bsc_schedule_timer(&osmoload.timeout, 0, 5000000);
+		osmo_timer_schedule(&osmoload.timeout, 0, 5000000);
 	}
 	if(osmoload.state == STATE_LOAD_IN_PROGRESS) {
 		osmoload.timeout.cb = &memop_timeout;
diff --git a/src/target/firmware/comm/timer.c b/src/target/firmware/comm/timer.c
index 54abc79..6a649ae 100644
--- a/src/target/firmware/comm/timer.c
+++ b/src/target/firmware/comm/timer.c
@@ -41,9 +41,9 @@ unsigned long volatile jiffies;
 	 ((long)(b) - (long)(a) < 0))
 #define time_before(a,b)        time_after(b,a)
 
-void add_timer(struct timer_list *timer)
+void add_timer(struct osmo_timer_list *timer)
 {
-	struct timer_list *list_timer;
+	struct osmo_timer_list *list_timer;
 
 	/* TODO: Optimize and remember the closest item... */
 	timer->active = 1;
@@ -57,13 +57,13 @@ void add_timer(struct timer_list *timer)
 	llist_add(&timer->entry, &timer_list);
 }
 
-void schedule_timer(struct timer_list *timer, int milliseconds)
+void schedule_timer(struct osmo_timer_list *timer, int milliseconds)
 {
 	timer->expires = jiffies + ((milliseconds * TIMER_HZ) / 1000);
 	add_timer(timer);
 }
 
-void del_timer(struct timer_list *timer)
+void del_timer(struct osmo_timer_list *timer)
 {
 	if (timer->in_list) {
 		timer->active = 0;
@@ -72,7 +72,7 @@ void del_timer(struct timer_list *timer)
 	}
 }
 
-int timer_pending(struct timer_list *timer)
+int timer_pending(struct osmo_timer_list *timer)
 {
 	return timer->active;
 }
@@ -113,7 +113,7 @@ struct timeval *nearest_timer()
  */
 void prepare_timers()
 {
-	struct timer_list *timer, *nearest_timer = NULL;
+	struct osmo_timer_list *timer, *nearest_timer = NULL;
 	llist_for_each_entry(timer, &timer_list, entry) {
 		if (!nearest_timer || time_before(timer->expires, nearest_timer->expires)) {
 			nearest_timer = timer;
@@ -133,7 +133,7 @@ void prepare_timers()
  */
 int update_timers(void)
 {
-	struct timer_list *timer, *tmp;
+	struct osmo_timer_list *timer, *tmp;
 	int work = 0;
 
 	/*
@@ -178,7 +178,7 @@ restart:
 
 int timer_check(void)
 {
-	struct timer_list *timer;
+	struct osmo_timer_list *timer;
 	int i = 0;
 
 	llist_for_each_entry(timer, &timer_list, entry) {
diff --git a/src/target/firmware/include/comm/timer.h b/src/target/firmware/include/comm/timer.h
index 42bf734..db7d1a5 100644
--- a/src/target/firmware/include/comm/timer.h
+++ b/src/target/firmware/include/comm/timer.h
@@ -27,7 +27,7 @@
 
 /**
  * Timer management:
- *      - Create a struct timer_list
+ *      - Create a struct osmo_timer_list
  *      - Fill out timeout and use add_timer or
  *        use schedule_timer to schedule a timer in
  *        x seconds and microseconds from now...
@@ -41,7 +41,7 @@
  *        the timers.
  *
  */
-struct timer_list {
+struct osmo_timer_list {
 	struct llist_head entry;
 	unsigned long expires;
 
@@ -58,10 +58,10 @@ extern unsigned long volatile jiffies;
 /**
  * timer management
  */
-void add_timer(struct timer_list *timer);
-void schedule_timer(struct timer_list *timer, int miliseconds);
-void del_timer(struct timer_list *timer);
-int timer_pending(struct timer_list *timer);
+void add_timer(struct osmo_timer_list *timer);
+void schedule_timer(struct osmo_timer_list *timer, int miliseconds);
+void del_timer(struct osmo_timer_list *timer);
+int timer_pending(struct osmo_timer_list *timer);
 
 
 /**
-- 
1.7.2.3





More information about the baseband-devel mailing list