[PATCH 3/6] src: use namespace prefix osmo_signal*

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


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

Summary of changes:

s/signal_cbfn/osmo_signal_cbfn/g
s/register_signal_handler/osmo_signal_register_handler/g
s/unregister_signal_handler/osmo_signal_unregister_handler/g
s/dispatch_signal/osmo_signal_dispatch/g
---
 src/host/layer23/src/common/l1ctl.c         |   18 +++++++++---------
 src/host/layer23/src/misc/app_bcch_scan.c   |    2 +-
 src/host/layer23/src/misc/app_cbch_sniff.c  |    2 +-
 src/host/layer23/src/misc/app_ccch_scan.c   |    2 +-
 src/host/layer23/src/misc/bcch_scan.c       |    2 +-
 src/host/layer23/src/misc/cell_log.c        |    4 ++--
 src/host/layer23/src/mobile/app_mobile.c    |   12 ++++++------
 src/host/layer23/src/mobile/main.c          |    2 +-
 src/host/layer23/src/mobile/vty_interface.c |    2 +-
 9 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/src/host/layer23/src/common/l1ctl.c b/src/host/layer23/src/common/l1ctl.c
index f2714e6..a2fd865 100644
--- a/src/host/layer23/src/common/l1ctl.c
+++ b/src/host/layer23/src/common/l1ctl.c
@@ -92,7 +92,7 @@ static int rx_l1_fbsb_conf(struct osmocom_ms *ms, struct msgb *msg)
 
 	if (sb->result != 0) {
 		LOGP(DL1C, LOGL_ERROR, "FBSB RESP: result=%u\n", sb->result);
-		dispatch_signal(SS_L1CTL, S_L1CTL_FBSB_ERR, ms);
+		osmo_signal_dispatch(SS_L1CTL, S_L1CTL_FBSB_ERR, ms);
 		return 0;
 	}
 
@@ -102,7 +102,7 @@ static int rx_l1_fbsb_conf(struct osmocom_ms *ms, struct msgb *msg)
 	fr.ms = ms;
 	fr.snr = dl->snr;
 	fr.bsic = sb->bsic;
-	dispatch_signal(SS_L1CTL, S_L1CTL_FBSB_RESP, &fr);
+	osmo_signal_dispatch(SS_L1CTL, S_L1CTL_FBSB_RESP, &fr);
 
 	return 0;
 }
@@ -177,7 +177,7 @@ static int rx_ph_data_ind(struct osmocom_ms *ms, struct msgb *msg)
 			if (meas->dsc > 0)
 				break;
 			meas->ds_fail = 0;
-			dispatch_signal(SS_L1CTL, S_L1CTL_LOSS_IND, ms);
+			osmo_signal_dispatch(SS_L1CTL, S_L1CTL_LOSS_IND, ms);
 			break;
 		}
 	} else {
@@ -199,7 +199,7 @@ static int rx_ph_data_ind(struct osmocom_ms *ms, struct msgb *msg)
 			if (meas->s > 0)
 				break;
 			meas->rl_fail = 0;
-			dispatch_signal(SS_L1CTL, S_L1CTL_LOSS_IND, ms);
+			osmo_signal_dispatch(SS_L1CTL, S_L1CTL_LOSS_IND, ms);
 			break;
 		}
 	}
@@ -656,7 +656,7 @@ int l1ctl_tx_reset_req(struct osmocom_ms *ms, uint8_t type)
 static int rx_l1_reset(struct osmocom_ms *ms)
 {
 	LOGP(DL1C, LOGL_INFO, "Layer1 Reset indication\n");
-	dispatch_signal(SS_L1CTL, S_L1CTL_RESET, ms);
+	osmo_signal_dispatch(SS_L1CTL, S_L1CTL_RESET, ms);
 
 	return 0;
 }
@@ -674,7 +674,7 @@ static int rx_l1_pm_conf(struct osmocom_ms *ms, struct msgb *msg)
 		mr.band_arfcn = ntohs(pmr->band_arfcn);
 		mr.rx_lev = pmr->pm[0];
 		mr.ms = ms;
-		dispatch_signal(SS_L1CTL, S_L1CTL_PM_RES, &mr);
+		osmo_signal_dispatch(SS_L1CTL, S_L1CTL_PM_RES, &mr);
 	}
 	return 0;
 }
@@ -697,7 +697,7 @@ static int rx_l1_ccch_mode_conf(struct osmocom_ms *ms, struct msgb *msg)
 
 	mc.ccch_mode = conf->ccch_mode;
 	mc.ms = ms;
-	dispatch_signal(SS_L1CTL, S_L1CTL_CCCH_MODE_CONF, &mc);
+	osmo_signal_dispatch(SS_L1CTL, S_L1CTL_CCCH_MODE_CONF, &mc);
 
 	return 0;
 }
@@ -720,7 +720,7 @@ static int rx_l1_tch_mode_conf(struct osmocom_ms *ms, struct msgb *msg)
 
 	mc.tch_mode = conf->tch_mode;
 	mc.ms = ms;
-	dispatch_signal(SS_L1CTL, S_L1CTL_TCH_MODE_CONF, &mc);
+	osmo_signal_dispatch(SS_L1CTL, S_L1CTL_TCH_MODE_CONF, &mc);
 
 	return 0;
 }
@@ -764,7 +764,7 @@ int l1ctl_recv(struct osmocom_ms *ms, struct msgb *msg)
 	case L1CTL_PM_CONF:
 		rc = rx_l1_pm_conf(ms, msg);
 		if (l1h->flags & L1CTL_F_DONE)
-			dispatch_signal(SS_L1CTL, S_L1CTL_PM_DONE, ms);
+			osmo_signal_dispatch(SS_L1CTL, S_L1CTL_PM_DONE, ms);
 		msgb_free(msg);
 		break;
 	case L1CTL_RACH_CONF:
diff --git a/src/host/layer23/src/misc/app_bcch_scan.c b/src/host/layer23/src/misc/app_bcch_scan.c
index 9a01694..3ad426d 100644
--- a/src/host/layer23/src/misc/app_bcch_scan.c
+++ b/src/host/layer23/src/misc/app_bcch_scan.c
@@ -54,7 +54,7 @@ int l23_app_init(struct osmocom_ms *ms)
 	/* don't do layer3_init() as we don't want an actualy L3 */
 	fps_init(ms);
 	l1ctl_tx_reset_req(ms, L1CTL_RES_T_FULL);
-	return register_signal_handler(SS_L1CTL, &signal_cb, NULL);
+	return osmo_signal_register_handler(SS_L1CTL, &signal_cb, NULL);
 }
 
 static struct l23_app_info info = {
diff --git a/src/host/layer23/src/misc/app_cbch_sniff.c b/src/host/layer23/src/misc/app_cbch_sniff.c
index 77427fa..2df1e54 100644
--- a/src/host/layer23/src/misc/app_cbch_sniff.c
+++ b/src/host/layer23/src/misc/app_cbch_sniff.c
@@ -185,7 +185,7 @@ int l23_app_init(struct osmocom_ms *ms)
 	/* FIXME: L1CTL_RES_T_FULL doesn't reset dedicated mode
 	 * (if previously set), so we release it here. */
 	l1ctl_tx_dm_rel_req(ms);
-	return register_signal_handler(SS_L1CTL, &signal_cb, NULL);
+	return osmo_signal_register_handler(SS_L1CTL, &signal_cb, NULL);
 }
 
 static struct l23_app_info info = {
diff --git a/src/host/layer23/src/misc/app_ccch_scan.c b/src/host/layer23/src/misc/app_ccch_scan.c
index 913ceca..02b5e47 100644
--- a/src/host/layer23/src/misc/app_ccch_scan.c
+++ b/src/host/layer23/src/misc/app_ccch_scan.c
@@ -465,7 +465,7 @@ static int signal_cb(unsigned int subsys, unsigned int signal,
 
 int l23_app_init(struct osmocom_ms *ms)
 {
-	register_signal_handler(SS_L1CTL, &signal_cb, NULL);
+	osmo_signal_register_handler(SS_L1CTL, &signal_cb, NULL);
 	l1ctl_tx_reset_req(ms, L1CTL_RES_T_FULL);
 	return layer3_init(ms);
 }
diff --git a/src/host/layer23/src/misc/bcch_scan.c b/src/host/layer23/src/misc/bcch_scan.c
index fc88254..ddd0eea 100644
--- a/src/host/layer23/src/misc/bcch_scan.c
+++ b/src/host/layer23/src/misc/bcch_scan.c
@@ -314,5 +314,5 @@ int fps_start(struct osmocom_ms *ms)
 
 int fps_init(void)
 {
-	return register_signal_handler(SS_L1CTL, &bscan_sig_cb, NULL);
+	return osmo_signal_register_handler(SS_L1CTL, &bscan_sig_cb, NULL);
 }
diff --git a/src/host/layer23/src/misc/cell_log.c b/src/host/layer23/src/misc/cell_log.c
index a1a764b..3f51f87 100644
--- a/src/host/layer23/src/misc/cell_log.c
+++ b/src/host/layer23/src/misc/cell_log.c
@@ -783,7 +783,7 @@ static int rcv_rsl(struct msgb *msg, struct osmocom_ms *ms)
 int scan_init(struct osmocom_ms *_ms)
 {
 	ms = _ms;
-	register_signal_handler(SS_L1CTL, &signal_cb, NULL);
+	osmo_signal_register_handler(SS_L1CTL, &signal_cb, NULL);
 	memset(&timer, 0, sizeof(timer));
 	osmol2_register_handler(ms, &rcv_rsl);
 	g.enable = 1;
@@ -812,7 +812,7 @@ int scan_exit(void)
 		osmo_gps_close();
 	if (logfp)
 		fclose(logfp);
-	unregister_signal_handler(SS_L1CTL, &signal_cb, NULL);
+	osmo_signal_unregister_handler(SS_L1CTL, &signal_cb, NULL);
 	stop_timer();
 
 	return 0;
diff --git a/src/host/layer23/src/mobile/app_mobile.c b/src/host/layer23/src/mobile/app_mobile.c
index 33fdde6..e37ac98 100644
--- a/src/host/layer23/src/mobile/app_mobile.c
+++ b/src/host/layer23/src/mobile/app_mobile.c
@@ -329,9 +329,9 @@ int l23_app_work(int *_quit)
 /* global exit */
 int l23_app_exit(void)
 {
-	unregister_signal_handler(SS_L1CTL, &gsm322_l1_signal, NULL);
-	unregister_signal_handler(SS_L1CTL, &mobile_signal_cb, NULL);
-	unregister_signal_handler(SS_GLOBAL, &global_signal_cb, NULL);
+	osmo_signal_unregister_handler(SS_L1CTL, &gsm322_l1_signal, NULL);
+	osmo_signal_unregister_handler(SS_L1CTL, &mobile_signal_cb, NULL);
+	osmo_signal_unregister_handler(SS_GLOBAL, &global_signal_cb, NULL);
 
 	osmo_gps_close();
 
@@ -375,9 +375,9 @@ int l23_app_init(int (*mncc_recv)(struct osmocom_ms *ms, int, void *),
 		return rc;
 	printf("VTY available on port %u.\n", vty_port);
 
-	register_signal_handler(SS_GLOBAL, &global_signal_cb, NULL);
-	register_signal_handler(SS_L1CTL, &mobile_signal_cb, NULL);
-	register_signal_handler(SS_L1CTL, &gsm322_l1_signal, NULL);
+	osmo_signal_register_handler(SS_GLOBAL, &global_signal_cb, NULL);
+	osmo_signal_register_handler(SS_L1CTL, &mobile_signal_cb, NULL);
+	osmo_signal_register_handler(SS_L1CTL, &gsm322_l1_signal, NULL);
 
 	if (llist_empty(&ms_list)) {
 		struct osmocom_ms *ms;
diff --git a/src/host/layer23/src/mobile/main.c b/src/host/layer23/src/mobile/main.c
index 1f423a2..1f15669 100644
--- a/src/host/layer23/src/mobile/main.c
+++ b/src/host/layer23/src/mobile/main.c
@@ -140,7 +140,7 @@ void sighandler(int sigset)
 	signal(SIGTERM, SIG_DFL);
 	signal(SIGPIPE, SIG_DFL);
 
-	dispatch_signal(SS_GLOBAL, S_GLOBAL_SHUTDOWN, NULL);
+	osmo_signal_dispatch(SS_GLOBAL, S_GLOBAL_SHUTDOWN, NULL);
 }
 
 int main(int argc, char **argv)
diff --git a/src/host/layer23/src/mobile/vty_interface.c b/src/host/layer23/src/mobile/vty_interface.c
index 418c3f6..debe36e 100644
--- a/src/host/layer23/src/mobile/vty_interface.c
+++ b/src/host/layer23/src/mobile/vty_interface.c
@@ -2266,7 +2266,7 @@ gDEFUN(ournode_end,
 DEFUN(off, off_cmd, "off",
 	"Turn mobiles off (shutdown) and exit")
 {
-	dispatch_signal(SS_GLOBAL, S_GLOBAL_SHUTDOWN, NULL);
+	osmo_signal_dispatch(SS_GLOBAL, S_GLOBAL_SHUTDOWN, NULL);
 
 	return CMD_SUCCESS;
 }
-- 
1.7.2.3





More information about the baseband-devel mailing list