diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2022-04-24 16:51:59 -0700 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2022-04-24 16:51:59 -0700 |
commit | 23f54e51f5bb62ffa98383df996441c5852b5d2d (patch) | |
tree | bb73b9c45e7deb590c4f3f9a2845beebf1fbf17e /src/modules/plato | |
parent | 549fa449749803818a715f887d8e12ceeb985989 (diff) |
til_setup: introduce til_setup_t
Preparatory commit for providing a res_setup type to replace
void*.
The impetus for this isn't just pursuit of less void*, but
primarily implementing setup freeing by embedding this struct
into the private setup types.
An alternative method of adding setup freeing would have been to
introduce something like til_module_t.free_setup(). But that
would require having the til_module_t on hand, and the whole
setup machinery is more generalized than til_module_t anyways.
This way anything can simply embed the struct in their private
setup instance and return the pointer to that in *res_setup.
They should always be able to find their containing struct's
offset from the til_setup_t* they returned. Either by using
container_of(), or simply placing it at the start of the private
setup struct.
Diffstat (limited to 'src/modules/plato')
0 files changed, 0 insertions, 0 deletions