[PATCH] ubus: add a private field to event handlers
Felix Fietkau
nbd at nbd.name
Wed Jul 14 06:28:19 PDT 2021
On 2021-07-13 13:57, Louis_Hampton at SERCOMM.COM wrote:
>
> This is particularly useful in multithreaded non-C FFI, where
> additional context from where the event handler was registered may be
> critical to ensuring the output of the event is sent to the right
> location.
>
> Signed-off-by: Louis Hampton <louis_hampton at sercomm.com>
In order to get the additional context, the normal solution is to embed
struct ubus_event_handler into another data structure, which contains
the extra context and can be accessed via container_of.
Is there a reason why this can't be done in your code as well?
- Felix
More information about the openwrt-devel
mailing list