libmango: add macros for easily defining msg and iovec variables
This commit is contained in:
@@ -28,6 +28,19 @@
|
||||
#define KERN_CFG_INVALID 0x00u
|
||||
#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 virt_addr_t;
|
||||
typedef uint64_t msgid_t;
|
||||
|
||||
Reference in New Issue
Block a user