linux - How to use POSIX message queues with infinite timeout? -
i trying send/receive messages without specifying timeout. so, need infinite timeout. vxworks provides wait_forever
, when supposed not limit timeout. in linux not available. value should given defining mq_wait_forever
?
define mq_wait_forever ???
clock_gettime( clock_realtime, ¤ttime);
/* calculate time out value sending */
abs_timeout.tv_sec = currenttime.tv_sec + (mq_wait_forever / 1000000);
abs_timeout.tv_nsec = currenttime.tv_nsec + (mq_wait_forever / 1000);
thanks lot in advance!
gökce
Comments
Post a Comment