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:
@@ -5,11 +5,13 @@
|
|||||||
|
|
||||||
|
|
||||||
#include <util/list.h>
|
#include <util/list.h>
|
||||||
|
#include <BytePointer.h>
|
||||||
|
|
||||||
|
|
||||||
#define GET_ITEM(list, item) ((void *)((uint8 *)item - list->offset))
|
#define GET_ITEM(list, item) ({ BytePointer<void> pointer((uint8*)item \
|
||||||
#define GET_LINK(list, item) ((list_link *)((uint8 *)item + list->offset))
|
- 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
|
/** Initializes the list with a specified offset to the link
|
||||||
* structure in the items that will be part of the list.
|
* structure in the items that will be part of the list.
|
||||||
|
|||||||
Reference in New Issue
Block a user