libmango: add macros for easily defining msg and iovec variables

This commit is contained in:
2026-02-21 11:29:25 +00:00
parent 3190035086
commit 2537ca46de

View File

@@ -28,6 +28,19 @@
#define KERN_CFG_INVALID 0x00u #define KERN_CFG_INVALID 0x00u
#define KERN_CFG_PAGE_SIZE 0x01u #define KERN_CFG_PAGE_SIZE 0x01u
#define IOVEC(p, len) \
{ \
.io_base = (virt_addr_t)(p), \
.io_len = (len), \
}
#define MSG(data, data_count, handles, handles_len) \
{ \
.msg_data = (data), \
.msg_data_count = (data_count), \
.msg_handles = (handles), \
.msg_handles_count = (handles_len), \
}
typedef uintptr_t phys_addr_t; typedef uintptr_t phys_addr_t;
typedef uintptr_t virt_addr_t; typedef uintptr_t virt_addr_t;
typedef uint64_t msgid_t; typedef uint64_t msgid_t;