Thread #108270573
HomeIndexCatalogAll ThreadsNew ThreadReply
H
previous: >>108262843

#define __NR_msgget                68
#define __NR_msgsnd 69
#define __NR_msgrcv 70
#define __NR_msgctl 71

https://man7.org/linux/man-pages/man2/msgget.2.html
https://man7.org/linux/man-pages/man2/msgop.2.html
https://man7.org/linux/man-pages/man2/msgctl.2.html

tl;dr:
message queues, but worse!
https://man7.org/linux/man-pages/man7/mq_overview.7.html
to be clear, these syscalls are NOT posix message queues. but the above link mentions them in the notes, and it should explain a bit more

one of about infinity different implementations of IPC. from the before times...
what IPC do you use? do you have a favorite subset of IPC? personally, i'm quite fond of RPC.

relevant resources:
man man

man syscalls

https://man7.org/linux/man-pages/
https://linux.die.net/man/
https://elixir.bootlin.com/linux/
https://elixir.bootlin.com/musl/
https://elixir.bootlin.com/glibc/
+Showing all 16 replies.
>>
I love message queues, the only drawback is that eventually in the development lifecycle you notice that you actually sometimes need two way communication and then you are kind of fucked and have to bolt on something else anyways
>>
What's the point of these when you can use a socket instead?
>>
>>108270573
>one of about infinity different implementations of IPC. from the before times...
This is because of Unix brain damage. They can't just put things in a library. It has to be in the kernel for all time and you can't ever remove it. And they can't just extend features. They have to make a completely different feature that does the same thing and keep both around forever.
>>
>>108270573
>what IPC do you use?
AF_UNIX SOCK_SEQPACKET/SOCK_DGRAM, with socketpair() whenever possible.

>>108270928
This guy knows.
>>
bampu
>>
>>108270573
How did this ever get implemented by a real, breathing human? How do you miss the point so hard?
>>
>>108272022
what's your big problem with them?
>>108270987
certain primitives simply cannot be implemented in user space. and even if some of them could be abstracted out of kernel parts, doing it all in-kernel is much more performant
>>
>>108270928
>not berformant enough
>>
>>108272288
>just make a syscall instead of using mov bro
>it'll be so much faster, so much performant
>>
>>108272796
one day, people will actually argue in good faith. not today though
>>
>>108272796
>processes trample all over each other
>both ultimately sigsegv
>>
/msg OP u r fsgot
>>
File: image0-11.jpg (104.4 KB)
104.4 KB
104.4 KB JPG
>>108273752
be nice to me ;___; i'm sensitive
>>
>>108274228
Only the nocoder trannies who are only here to post about phones and soitrch don't like OP
>>
>>108274721
hmmm hmm
maybe
i think some people are just a little spikey sometimes
>>
>>108273739
Just use shared memory and atomics breh, fully userspace IPC

Reply to Thread #108270573


Supported: JPG, PNG, GIF, WebP, WebM, MP4, MP3 (max 4MB)