gensio_acc...t_callback(3)
π gensio_acc...t_callback β bestie edition π
okay so this is a page from the Library Functions Manual (yes the gensio crew, they're iconic) and it's all about three little functions that handle your gensio accepter's event callback + user data situation. no cap, it's short but it's IMPORTANT, so let's go π¦
β¨ NAME β¨
gensio_accepter_set_callback, gensio_accepter_get_user_data, gensio_accepter_set_user_data β set the event callback and user data for a gensio accepter π
πΈ SYNOPSIS πΈ
#include <gensio/gensio.h>
void gensio_accepter_set_callback(struct gensio *io,
gensio_accepter_event cb, void *user_data)
void gensio_accepter_set_user_data(struct gensio *io, void *user_data);
void *gensio_accepter_get_user_data(struct gensio *io)
π DESCRIPTION π
π
gensio_accepter_set_callback
sets the event handler and data for the gensio accepter. literally that's its whole job.
BUT β and this is the part where you gotta listen β you may call this function again only if the gensio accepter cannot generate any callbacks, which is generally after it has been shutdown. otherwise? race conditions may occur π like, do not do that, bestie, it's giving chaos.
π«Ά gensio_accepter_set_user_data
just sets the user_data field in the gensio accepter. that's it, that's the whole vibe.
β οΈ if this is called when the gensio is running, race conditions may occur. so likeβ¦ be careful?? π
β gensio_accepter_get_user_data
returns the user data that was passed in when the gensio accepter was created, or that was set by one of the above two functions. it just hands it back to you, no questions asked π
π SEE ALSO π
and that's the whole page, bestie!! go forth and callback responsibly πβ¨
this lil beauty came from the Library Functions Manual, dated 27 Feb 2019 β so yeah, vintage queen behavior ππ mwah, bye!! ππ¦
π¦ where this page comes from
- alpine 3.22: gensio-doc 2.8.14-r0 Β· GPL-2.0-only AND LGPL-2.1-only AND Apache-2.0
- alpine 3.23: gensio-doc 2.8.14-r0 Β· GPL-2.0-only AND LGPL-2.1-only AND Apache-2.0
- alpine 3.24: gensio-doc 2.8.14-r0 Β· GPL-2.0-only AND LGPL-2.1-only AND Apache-2.0
- arch rolling: gensio 3.0.4-1 Β· GPL
- debian bookworm: libgensio-dev 2.6.2-4 Β· GPL-2.0-only
- debian trixie: libgensio-dev 2.8.13-7 Β· GPL-2.0-only
- epel 9: libgensio-devel 2.8.15-1.el9 Β· GPL-2.0-only AND LGPL-2.1-only AND Apache-2.0
- fedora 43: libgensio-devel 2.8.15-5.fc43 Β· GPL-2.0-only AND LGPL-2.1-only AND Apache-2.0
- fedora 43: libgensio-devel 2.8.15-5.fc43 Β· GPL-2.0-only AND LGPL-2.1-only AND Apache-2.0
- fedora 43: libgensio-devel 3.0.4-1.fc43 Β· GPL-2.0-only AND LGPL-2.1-only AND Apache-2.0
- fedora 43: libgensio-devel 3.0.4-1.fc43 Β· GPL-2.0-only AND LGPL-2.1-only AND Apache-2.0
- fedora 44: libgensio-devel 3.0.2-1.fc44 Β· GPL-2.0-only AND LGPL-2.1-only AND Apache-2.0
- fedora 44: libgensio-devel 3.0.2-1.fc44 Β· GPL-2.0-only AND LGPL-2.1-only AND Apache-2.0
- fedora 44: libgensio-devel 3.0.4-1.fc44 Β· GPL-2.0-only AND LGPL-2.1-only AND Apache-2.0
- fedora 44: libgensio-devel 3.0.4-1.fc44 Β· GPL-2.0-only AND LGPL-2.1-only AND Apache-2.0
- nixos 26.05: gensio 3.0.2
- nixpkgs unstable: gensio 3.0.2
- opensuse-leap 16.0: gensio-devel 2.8.2-bp160.1.13 Β· Apache-2.0 AND GPL-2.0-only AND LGPL-2.1-only
- opensuse-leap 16.0: gensio-devel 2.8.2-bp160.1.13 Β· Apache-2.0 AND GPL-2.0-only AND LGPL-2.1-only
- opensuse-leap 16.0: gensio-devel 2.8.2-bp160.1.13 Β· Apache-2.0 AND GPL-2.0-only AND LGPL-2.1-only
- opensuse-leap 16.0: gensio-devel 2.8.2-bp160.1.13 Β· Apache-2.0 AND GPL-2.0-only AND LGPL-2.1-only
- ubuntu jammy: libgensio-dev 2.3.5-1build2 Β· GPL-2.0-only
- ubuntu noble: libgensio-dev 2.8.2-6.1build1 Β· GPL-2.0-only
- ubuntu questing: libgensio-dev 2.8.13-7
- ubuntu resolute: libgensio-dev 3.0.0-1build1 Β· GPL-2.0-only
- ubuntu stonking: libgensio-dev 3.0.0-1ubuntu1 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms