Testing done: used ipc component for this test.
Test programs are from https://beej.us/guide/bgipc/html/multi/mq.html
So I did create message queue and had some data sent:
tsoome@beastie:~$ ./kirk
Enter lines of text, ^D to quit:
help?
hello kirk here
spock?!
now lets see with mdb if we can see the messages in the queue:
> ::ipcs -l
Message queues:
ADDR REF ID KEY MODE PRJID ZONEID OWNER GROUP CREAT CGRP
ffffff0de1f06000 1 2 42908003 0644 10 0 101 10 101 10
&list: ffffff0de1f06070
cbytes: 0t7 qnum: 0t1 qbytes: 0t65536 qmax: 0t8192
lspid: 0t5482 lrpid: 0t5581
stime: 2019 Dec 17 20:39:02
rtime: 2019 Dec 17 20:38:53
ctime: 2019 Dec 17 20:31:32
snd_cnt: 0t0 snd_cv: 0 (ffffff0de1f060f0)
Blocked recievers
Thread Addr Type cv addr copyout-wait?
Blocked senders
Thread Addr Type cv addr Msg Size
Total number of waiters: 0
Shared memory:
Semaphores:
> ffffff0de1f06070::walk list | ::msg -l
ADDR TEXT SIZE TYPE REF
ffffff0d25a2fa70 ffffff0d22919080 7 1 1
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
0: 68656c70 3f0000 help?..
ffffff0d3ce3a130 ffffff0d95a7b180 17 1 1
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00: 68656c6c 6f206b69 726b2068 65726500 hello kirk here.
10: 00 .
ffffff0d9a8c5dd8 ffffff0d0cac2140 9 1 1
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
0: 73706f63 6b3f2100 00 spock?!..
>
and running spock:
tsoome@beastie:~$ ./spock
spock: ready to receive messages, captain.
spock: "help?"
spock: "hello kirk here"
spock: "spock?!"
indeed, we got all. And now the list is empty:
> ffffff0de1f06070::walk list | ::msg -l
>