[XL] Change in libosmocore[master]: Add osmo_io with initial poll backend
Attention is currently required from: osmith, Hoernchen, neels, pespin, fixeria. daniel has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/30934 ) Change subject: Add osmo_io with initial poll backend ...................................................................... Patch Set 8: (2 comments) File src/core/osmo_io.c: https://gerrit.osmocom.org/c/libosmocore/+/30934/comment/f516f35b_750d09f6 PS8, Line 169: llist_add_tail(&msghdr->list, &iofd->tx_queue.msg_queue);
Could be msgb_enqueue_count(), but it can stay this way too. I had that at first, but msgb_enqueue_count() takes a struct msgb * and derefereces the ->list pointer in msgb_enqueue().
So this would require casting a msghdr * to a msgb * and relying on the fact that the list member is in the same position in both structs which I quite dislike. File src/core/osmo_io_poll.c: https://gerrit.osmocom.org/c/libosmocore/+/30934/comment/b043b551_197e07ec PS8, Line 85: if (iofd->closed)
is this the new -EBADF to handle case where recvmsg_cb closes th iofd? What if iofd is freed by recv […] closed, in_callback, and to_free
Closed is the early-return that prevents the write from being considered when the fd is already closed. in_callback is set to true while inside this function. If osmo_iofd_free() is called while in_callback is true then it will only close the fd and defer actually freeing the data and just set to_free to true. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/30934 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I50d73cf550d6ce8154bf827bf47408131cf5b0a0 Gerrit-Change-Number: 30934 Gerrit-PatchSet: 8 Gerrit-Owner: daniel <dwillmann@sysmocom.de> Gerrit-Reviewer: Hoernchen <ewild@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de> Gerrit-Reviewer: laforge <laforge@osmocom.org> Gerrit-Reviewer: neels <nhofmeyr@sysmocom.de> Gerrit-Reviewer: osmith <osmith@sysmocom.de> Gerrit-Reviewer: pespin <pespin@sysmocom.de> Gerrit-Attention: osmith <osmith@sysmocom.de> Gerrit-Attention: Hoernchen <ewild@sysmocom.de> Gerrit-Attention: neels <nhofmeyr@sysmocom.de> Gerrit-Attention: pespin <pespin@sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy@sysmocom.de> Gerrit-Comment-Date: Tue, 04 Apr 2023 11:43:25 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <pespin@sysmocom.de> Gerrit-MessageType: comment
participants (1)
-
daniel