Skip to content
Advertisement

Tag: mqueue

Should mqueues be protected by semaphores

Should read mq_receive and write mq_send be protected by semaphores when accessing a queue in a multiprocess program or is there any sort of protection alredy built in Answer It’s always recomended to read the formal documentation for API you are using. Specifcally for mq_receive and mq_send these are: https://man7.org/linux/man-pages/man3/mq_send.3.html https://man7.org/linux/man-pages/man3/mq_receive.3.html In the atributes section you can see that both

Advertisement