1 The difference between Posix message queue and System V message queue
The message queue continues with the kernel; it
is different from the systemV message queue: reading the posix message queue always returns the earliest message with the highest priority, the systemV message queue can return the message of the specified priority; when inserting a message into an empty queue, posix Message queue allows to generate a signal or start a thread, systemV message queue does not have this mechanism
2 Create & Open
3 delete
The mechanism of deleting a message queue is the same as deleting a file. When all processes that have opened the message queue have closed the message queue, calling mq_unlink will delete the queue.
4 Get/set attributes
5 Insert/remove message
The posix message queue allows to send messages with a length of 0 bytes. The return value of the mq_receive receiving function is the length of the received bytes. The return value of all this function is 0 for the received data with a length of 0 bytes, and the return of -1 indicates an error.
6 restrictions
7 Asynchronous notification mechanism