How to use Linux message queues?

Gary Willoughby via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Nov 15 04:03:27 PST 2014


On Saturday, 15 November 2014 at 00:33:02 UTC, Neven wrote:
> On Friday, 14 November 2014 at 16:45:45 UTC, Sean Kelly wrote:
>> Sounds like a module that should be in core.sys.linux.  Care 
>> to submit a pull request?
>
> Ok, I've tried to make a module, though since I'm a D beginner 
> (also a student who fiddles with D for Operating system 
> classes) could you first feedback my code? I'm unsure in few 
> parts which I commented on.
>
> I spent some time reading manuals, reading through ipc.d for 
> info how to do it, and reading msg.h in my distro (Linux Mint 
> x86-64 17) includes.
>
> http://pastebin.com/xxJe2FYa

Not a bad start. A little tip, use c_long and c_ulong from 
core.stdc.config instead of long/ulong when interfacing with C. 
This is because its size changes when compiled on different 
architectures.


More information about the Digitalmars-d-learn mailing list