On 26.03.2025 18:47, Oleksii Kurochko wrote: > --- a/xen/include/xen/config.h > +++ b/xen/include/xen/config.h > @@ -98,4 +98,13 @@ > #define ZERO_BLOCK_PTR ((void *)-1L) > #endif > > +#define BYTES_PER_LONG __SIZEOF_LONG__ > + > +#define BITS_PER_BYTE __CHAR_BIT__ > +#define BITS_PER_INT (__SIZEOF_INT__ << 3) > +#define BITS_PER_LONG (BYTES_PER_LONG << 3) > +#define BITS_PER_LLONG (__SIZEOF_LONG_LONG__ << 3) > + > +#define POINTER_ALIGN __SIZEOF_POINTER__
Just one remark here: Imo this needs to come with a comment, as alignment and size aren't necessarily tied together. It's merely that we assume that sizeof(void *) == __alignof(void *). Jan