macros.h: Introduce side_ptr macros
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 21 Sep 2023 05:43:57 +0000 (06:43 +0100)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 21 Sep 2023 05:44:15 +0000 (06:44 +0100)
The side_ptr macros allow defining a pointer type which is suitable
for use by 32-bit and 64-bit kernels without compatibility code,
while preserving information about the pointer type.

Those pointers are stored as 64-bit integers, and the type of the
actual pointer is kept alongside with the 64-bit pointer value in a
0-len array within a union.

uintptr_t will fit within a uint64_t except on architectures with
128-bit pointers. This provides fixed-size pointers on architectures
with pointer size of 64-bit or less. Architectures with larger
pointer size will have to handle the ABI offset specifics explicitly.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>

No differences found
This page took 0.022377 seconds and 4 git commands to generate.