Message Queuing for 003:posix IPC

Source: Internet
Author: User

1: FIFO requires that a process be read-open before it is written to a pipe, compared to FIFO. Message Queuing does not need to have to wait for a message to arrive on the queue.

2:posix Each read always returns the highest priority, System V can return any priority.

3: Put a message into an empty queue, POSIX allows to generate a signal, or start a thread, system is not available.

Basic operation function of 4:posix:

1 #include <mqueue.h>2
3 mqd_t mq_open (constcharint oflag,...); 4 5 int mq_close (mqd_t mqds); 6 7 int mq_unlink (mqd_t mqds);

Properties of the 5.mqd_t mq_attr

struct mq_attr{long//0,o_nonblock block or non-blocking long mq_maxmsg; // Maximum number of messages a queue can hold Long // maximum length of a message long MQ_CURMSGA; // number of current queue messages };

Message Queuing for 003:posix IPC

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.