Open elBoberido opened 2 years ago
@dkroenke what is your opinion on this?
@elBoberido @dkroenke I would suggest to add mq_timedsend
and mq_timedreceive
to the iox platform files (include/mqueue.hpp
) as iox_mq_timesend
and iox_mq_timedreceive
(like we already do for iox_mq_open
) and correct the behavior directly there and set the errno like it is stated in the POSIX manual.
Then this behaves identical on every platform and we can get rid of macros, compiler checks and ifdefs in the production code.
This should also be our default approach whenever we discover platform specific code/macros inside the production code (except tests) to move that into the platform files.
@elfenpiff that's not quite the question here. The question is if we want to remove the workaround for SDP7.0 which means to handle this with the errno like it is stated in the POSIX manual or if we want to keep the workaround but tie it specifically to SDP7.0. Since this class is currently not used in iceoryx after the switch to unix domain sockets, we could take the easy route and remove the workaround and mark this as known limitation for this class on SDP7.0
@elBoberido I would invest a little bit more time here since in the future someone may be interested in the hoofs as a standalone library and would like to use the message queue. Then it would be nice that it is working. But this is only when we are talking about maybe some more hours and not days.
As addendum to my previous comment: I would remove TIMEOUT_ERRNO
from the message queue and handle everything consistently in the iox_mq_timed{send,receive}
functions.
Or maybe I got the problem wrong :/
Developer Meeting: iceoryx posh doesn't use the message queue anymore. So this is only a problem if someone uses the abstraction for message queue standalone. Therefore low prio for now
Required information
Operating system: QNX SDP7.1
Compiler version: QCC 8
Details
On QNX SDP7.0 the errno for a timeout in
mq_timedsend
/mq_timedreceive
wasEINTR
instead ofETIMEDOUT
. To fix this, theposix::MessageQueue
has aTIMEOUT_ERRNO
constexpr which is set toEINTR
on QNX andETIMEDOUT
on all other platforms.Since we switched to unix domain sockets and the mqueue is not used, the class is not used. We need to decide whether we want to just use
ETIMEDOUT
and ignore QNX SDP 7.0 or add a compiler switch like#ifdef __QNX__ && __GCC__MAJOR_VERSION__ == 5
. Since this class is not used anyway, removing the#ifdef
might be the best option.