fn shared_msg_write(msg_buf: *mut u8, msg: &[u8]) -> Result<u16, IpcError>
Write a message payload into a shared message buffer.