libqb
libqb copied to clipboard
Allow qb_ipcc_event_recv to receive pointer to shm file
RFE. Current qb_ipcc_event_recv requires caller to pass already allocated buffer. In corosync, we are passing 1M allocated on stack. This makes problems in environments with limited stack size. One solution is to allocate on heap. Even better solution seems to be used in corosync 1.x. Instead of memcpy of buffer from /dev/shm/file to provided preallocated size, it would be nice to have option (probably only for shm based IPC) to get direct pointer to shm file. This would make ipc to not only require additional space but also a little bit faster.
It must be portable across shm/socket. As long as it can do something sensible in the socket case I am ok with that. Else we get to a point where you can't switch to a socket implementation.
@asalkeld : Yes, it's expected to be ether extra call (like dispatch_in_place) where it will return ENOSUP on not supported ipc methods and developer must take care to call standard dispatch OR really do something useful even on unsupported socket.