Attention is currently required from: arehbein, laforge, pespin.
daniel has posted comments on this change. (
https://gerrit.osmocom.org/c/libosmocore/+/35079?usp=email )
Change subject: osmo_io: Remove union in struct osmo_io_ops
......................................................................
Patch Set 4:
(1 comment)
Patchset:
PS4:
It can know based on the OSMO_IO_FD_MODE configured
during osmo_iofd_setup(). […]
I disagree that we should put the burden of this onto
the user. It's an easy enough mistake to make.
This is complicated by the fact that the only way to set (either initially or later) the
callback function is by passing in a struct osmo_iofd_ops *. This means that with the
union there is *no* way at all to detect this.
```
osmo_iofd_setup(iofd, ..., mode, &ops); // Checking ops callbacks according to mode
doesn't work
osmo_iofd_set_ioops(iofd, &ops); // Same as above, we have iofd->mode, but ops is
ambiguous
```
Maybe you're thinking of osmo_stream_* where we have *_set_read_cb() etc. functions?
--
To view, visit
https://gerrit.osmocom.org/c/libosmocore/+/35079?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I138d57843edc29000530bb7896bcb239002ecbec
Gerrit-Change-Number: 35079
Gerrit-PatchSet: 4
Gerrit-Owner: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: arehbein <arehbein(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: arehbein <arehbein(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 30 Nov 2023 15:22:26 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Comment-In-Reply-To: daniel <dwillmann(a)sysmocom.de>
Gerrit-MessageType: comment