This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/20775 )
Change subject: Use osmo_fd_*_{disable,enable}
......................................................................
Use osmo_fd_*_{disable,enable}
Depends: libosmocore.git Idb89ba7bc7c129a6304a76900d17f47daf54d17d
Change-Id: I0da17d851ccb83c28a70c9039d0a4d1fe63da0ec
---
M src/common/pcu_sock.c
M src/osmo-bts-litecell15/l1_transp_hw.c
M src/osmo-bts-oc2g/l1_transp_hw.c
M src/osmo-bts-sysmo/l1_transp_hw.c
M src/osmo-bts-sysmo/misc/sysmobts_mgr_calib.c
5 files changed, 17 insertions(+), 17 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/75/20775/1
diff --git a/src/common/pcu_sock.c b/src/common/pcu_sock.c
index 0466698..733f5d6 100644
--- a/src/common/pcu_sock.c
+++ b/src/common/pcu_sock.c
@@ -877,7 +877,7 @@
return -EIO;
}
msgb_enqueue(&state->upqueue, msg);
- conn_bfd->when |= OSMO_FD_WRITE;
+ osmo_fd_write_enable(conn_bfd);
return 0;
}
@@ -907,7 +907,7 @@
regenerate_si4_restoctets(bts);
/* re-enable the generation of ACCEPT for new connections */
- state->listen_bfd.when |= OSMO_FD_READ;
+ osmo_fd_read_enable(&state->listen_bfd);
#if 0
/* remove si13, ... */
@@ -996,7 +996,7 @@
msg = llist_entry(state->upqueue.next, struct msgb, list);
pcu_prim = (struct gsm_pcu_if *)msg->data;
- bfd->when &= ~OSMO_FD_WRITE;
+ osmo_fd_write_disable(bfd);
/* bug hunter 8-): maybe someone forgot msgb_put(...) ? */
if (!msgb_length(msg)) {
@@ -1011,7 +1011,7 @@
goto close;
if (rc < 0) {
if (errno == EAGAIN) {
- bfd->when |= OSMO_FD_WRITE;
+ osmo_fd_write_enable(bfd);
break;
}
goto close;
diff --git a/src/osmo-bts-litecell15/l1_transp_hw.c b/src/osmo-bts-litecell15/l1_transp_hw.c
index ffe8613..36b77fe 100644
--- a/src/osmo-bts-litecell15/l1_transp_hw.c
+++ b/src/osmo-bts-litecell15/l1_transp_hw.c
@@ -99,7 +99,7 @@
struct msgb *msg, *tmp;
int written, count = 0;
- fd->when &= ~OSMO_FD_WRITE;
+ osmo_fd_write_disable(fd);
llist_for_each_entry(msg, &queue->msg_queue, list) {
/* more writes than we have */
@@ -117,7 +117,7 @@
/* Nothing scheduled? This should not happen. */
if (count == 0) {
if (!llist_empty(&queue->msg_queue))
- fd->when |= OSMO_FD_WRITE;
+ osmo_fd_write_enable(fd);
return 0;
}
@@ -125,7 +125,7 @@
if (written < 0) {
/* nothing written?! */
if (!llist_empty(&queue->msg_queue))
- fd->when |= OSMO_FD_WRITE;
+ osmo_fd_write_enable(fd);
return 0;
}
@@ -144,7 +144,7 @@
}
if (!llist_empty(&queue->msg_queue))
- fd->when |= OSMO_FD_WRITE;
+ osmo_fd_write_enable(fd);
}
return 0;
diff --git a/src/osmo-bts-oc2g/l1_transp_hw.c b/src/osmo-bts-oc2g/l1_transp_hw.c
index c9a5cde..acd45ae 100644
--- a/src/osmo-bts-oc2g/l1_transp_hw.c
+++ b/src/osmo-bts-oc2g/l1_transp_hw.c
@@ -99,7 +99,7 @@
struct msgb *msg, *tmp;
int written, count = 0;
- fd->when &= ~OSMO_FD_WRITE;
+ osmo_fd_write_disable(fd);
llist_for_each_entry(msg, &queue->msg_queue, list) {
/* more writes than we have */
@@ -117,7 +117,7 @@
/* Nothing scheduled? This should not happen. */
if (count == 0) {
if (!llist_empty(&queue->msg_queue))
- fd->when |= OSMO_FD_WRITE;
+ osmo_fd_write_enable(fd);
return 0;
}
@@ -125,7 +125,7 @@
if (written < 0) {
/* nothing written?! */
if (!llist_empty(&queue->msg_queue))
- fd->when |= OSMO_FD_WRITE;
+ osmo_fd_write_enable(fd);
return 0;
}
@@ -144,7 +144,7 @@
}
if (!llist_empty(&queue->msg_queue))
- fd->when |= OSMO_FD_WRITE;
+ osmo_fd_write_enable(fd);
}
return 0;
diff --git a/src/osmo-bts-sysmo/l1_transp_hw.c b/src/osmo-bts-sysmo/l1_transp_hw.c
index 5561af4..7df74eb 100644
--- a/src/osmo-bts-sysmo/l1_transp_hw.c
+++ b/src/osmo-bts-sysmo/l1_transp_hw.c
@@ -106,7 +106,7 @@
struct msgb *msg, *tmp;
int written, count = 0;
- fd->when &= ~OSMO_FD_WRITE;
+ osmo_fd_write_disable(fd);
llist_for_each_entry(msg, &queue->msg_queue, list) {
/* more writes than we have */
@@ -124,7 +124,7 @@
/* Nothing scheduled? This should not happen. */
if (count == 0) {
if (!llist_empty(&queue->msg_queue))
- fd->when |= OSMO_FD_WRITE;
+ osmo_fd_write_enable(fd);
return 0;
}
@@ -132,7 +132,7 @@
if (written < 0) {
/* nothing written?! */
if (!llist_empty(&queue->msg_queue))
- fd->when |= OSMO_FD_WRITE;
+ osmo_fd_write_enable(fd);
return 0;
}
@@ -151,7 +151,7 @@
}
if (!llist_empty(&queue->msg_queue))
- fd->when |= OSMO_FD_WRITE;
+ osmo_fd_write_enable(fd);
}
return 0;
diff --git a/src/osmo-bts-sysmo/misc/sysmobts_mgr_calib.c b/src/osmo-bts-sysmo/misc/sysmobts_mgr_calib.c
index 0126aaa..6ea2876 100644
--- a/src/osmo-bts-sysmo/misc/sysmobts_mgr_calib.c
+++ b/src/osmo-bts-sysmo/misc/sysmobts_mgr_calib.c
@@ -457,7 +457,7 @@
struct sysmobts_mgr_instance *mgr = data;
/* The connection failures are to be expected during boot */
- mgr->calib.bts_conn->ofd->when |= OSMO_FD_WRITE;
+ osmo_fd_write_enable(mgr->calib.bts_conn->ofd);
rc = ipa_client_conn_open(mgr->calib.bts_conn);
if (rc < 0) {
LOGP(DLCTRL, LOGL_NOTICE, "Failed to connect to BTS.\n");
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/20775
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I0da17d851ccb83c28a70c9039d0a4d1fe63da0ec
Gerrit-Change-Number: 20775
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201019/f39bed48/attachment.htm>