tools/nolibc/types: Implement `offsetof()` and `container_of()` macro
authorAmmar Faizi <ammarfaizi2@gnuweeb.org>
Tue, 29 Mar 2022 10:17:34 +0000 (17:17 +0700)
committerPaul E. McKenney <paulmck@kernel.org>
Thu, 21 Apr 2022 00:05:46 +0000 (17:05 -0700)
commit5a18d07ce3006dbcb3c4cfc7bf1c094a5da19540
tree733f0c3e19f7e9717bb29b31a718fb6a97ef56d3
parent544fa1a2d3e61c954ab531f2c790bc79c1745606
tools/nolibc/types: Implement `offsetof()` and `container_of()` macro

Implement `offsetof()` and `container_of()` macro. The first use case
of these macros is for `malloc()`, `realloc()` and `free()`.

Acked-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Ammar Faizi <ammarfaizi2@gnuweeb.org>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
tools/include/nolibc/types.h