kernel list: use BytePointer

Change-Id: I259cc33ad71cfbabc7f85278287a64a31dcb5e44
Reviewed-on: https://review.haiku-os.org/c/1101
Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
PulkoMandy
2019-03-10 20:57:18 +00:00
committed by waddlesplash
parent 810071751d
commit 14ffc38e44
+5 -3
View File
@@ -5,11 +5,13 @@
#include <util/list.h>
#include <BytePointer.h>
#define GET_ITEM(list, item) ((void *)((uint8 *)item - list->offset))
#define GET_LINK(list, item) ((list_link *)((uint8 *)item + list->offset))
#define GET_ITEM(list, item) ({ BytePointer<void> pointer((uint8*)item \
- list->offset); &pointer; })
#define GET_LINK(list, item) ({ BytePointer<list_link> pointer((uint8*)item \
+ list->offset); &pointer; })
/** Initializes the list with a specified offset to the link
* structure in the items that will be part of the list.