lib: xpc: implement writing to local buffers

This commit is contained in:
2026-03-15 09:43:00 +00:00
parent c9ccebacfc
commit ea2b0d3986
2 changed files with 16 additions and 3 deletions

View File

@@ -18,6 +18,13 @@
.buf_offset = (offset), \
.buf_len = (size), \
}
#define XPC_LOCAL_BUFFER_OUT(ptr, size) \
{ \
.buf_flags = XPC_BUFFER_F_OUT, \
.buf_ptr = (ptr), \
.buf_max = (size), \
.buf_len = (size), \
}
struct xpc_msg;
@@ -49,7 +56,7 @@ typedef struct xpc_buffer {
/* only valid if F_OUT is set.
* if F_FREE_ON_DISCARD is set, must be either NULL or
* allocated via xpc_context_alloc */
const char *buf_ptr;
void *buf_ptr;
};
/* fields that are only valid if F_IN is set */