zephyr/include
Fabio Baltieri 9c5dafed95 util: add type checking to CONTAINER_OF
Add a SAME_TYPE checking macro and use it to add type validation to
CONTAINER_OF. This is inspired by the Linux container_of implementation.

The check is inhibited when using C++ as __builtin_types_compatible_p is
not available there.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-09-07 20:17:48 +02:00
..
zephyr util: add type checking to CONTAINER_OF 2023-09-07 20:17:48 +02:00