pespin has posted comments on this change. (
https://gerrit.osmocom.org/c/libosmocore/+/31808 )
Change subject: select: Optimize osmo_fd_get_by_fd
......................................................................
Patch Set 1:
(1 comment)
File src/core/select.c:
https://gerrit.osmocom.org/c/libosmocore/+/31808/comment/8e55334e_1c54d17e
PS1, Line 223: if (fd->fd >= 0)
Here I'd like to have an OSMO_ASSERT(fd->fd
>=0) instead, but that made one unit test in osmo-mgw hi […]
BTW, the fact that
we assert there would also probably mean we can optimize osmo_fd_is_registered() to be
O(k) instead of O(n), because we can guarantee that the pointer in the table won't
leak and will be NULL when the fd is unregistered.
--
To view, visit
https://gerrit.osmocom.org/c/libosmocore/+/31808
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I8b71547df8bed84192cb160479fa3debf9b7eade
Gerrit-Change-Number: 31808
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Thu, 09 Mar 2023 17:51:05 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment