Functions and macros to make using IPC a little easier.
More...
#include <libtransistor/ipc.h>
#include <libtransistor/util.h>
#include <string.h>
Go to the source code of this file.
|
#define | ipc_buffer_from_reference(ptr, type) ipc_make_buffer((ptr), sizeof(*(ptr)), type) |
|
#define | ipc_msg_raw_data_from_reference(msg, ptr) |
|
#define | ipc_buffer_from_value(val, type) ipc_make_buffer(&(val), sizeof(val), type) |
|
#define | ipc_msg_raw_data_from_value(msg, val) |
|
#define | ipc_msg_set_buffers(msg, obj_arr, ptr_arr) |
|
#define | ipc_msg_copy_handle_from_value(msg, handle) |
|
#define | ipc_msg_copy_handle_from_reference(msg, handle) |
|
Functions and macros to make using IPC a little easier.
#define ipc_msg_copy_handle_from_reference |
( |
|
msg, |
|
|
|
handle |
|
) |
| |
Value:(msg).num_copy_handles = 1; \
(msg).copy_handles = handle;
#define ipc_msg_copy_handle_from_value |
( |
|
msg, |
|
|
|
handle |
|
) |
| |
Value:(msg).num_copy_handles = 1; \
(msg).copy_handles = &(handle);
#define ipc_msg_raw_data_from_reference |
( |
|
msg, |
|
|
|
ptr |
|
) |
| |
Value:msg.raw_data_size = sizeof(*(ptr)); \
msg.raw_data = (uint32_t*) (ptr);
#define ipc_msg_raw_data_from_value |
( |
|
msg, |
|
|
|
val |
|
) |
| |
Value:msg.raw_data_size = sizeof(val); \
msg.raw_data = (uint32_t*) (&(val));
#define ipc_msg_set_buffers |
( |
|
msg, |
|
|
|
obj_arr, |
|
|
|
ptr_arr |
|
) |
| |
Value:
for(size_t i = 0; i < ARRAY_LENGTH(obj_arr); i++) { \
(ptr_arr)[i] = &(obj_arr)[i]; \
} \
(msg).num_buffers = ARRAY_LENGTH(obj_arr); \
(msg).buffers = (ptr_arr);
Buffer for transfer over IPC.
Definition: ipc.h:62