Skip to contentSkip to conversation

Shared Memory?

Xenomai-help Kent Borg 2 participants 3 messages Dec 20, 2005

lore
Share & tools
lore

Kent Borg

author
#0 lore raw

Looking at the Xenomai documentation, I can't see how to do shared memory communication between a realtime and non-realtime userland task. Do I just use regular Linux shared memory, but somehow lock it down?

Thanks,

-kb

#1 lore raw
Quoted 5 lines · Kent Borg

Looking at the Xenomai documentation, I can't see how to do shared memory communication between a realtime and non-realtime userland task. Do I just use regular Linux shared memory, but somehow lock it down?

Use mixed RT/non-RT threads and you will have shared mem for free, use processes and you only have to ask linux for some shared fragments. In any case don't forget to mlockall() your RT-processes!

Jan

PS: You only need "special" Xenomai services for allocating mem when you want to shared it between kernel and user land.

author
#2 lore raw
Quoted 3 lines · Jan Kiszka

Use mixed RT/non-RT threads and you will have shared mem for free, use processes and you only have to ask linux for some shared fragments. In any case don't forget to mlockall() your RT-processes!

So does that mean regular shmget() to set up the shared memory, and mlockall() in the RT process? I was thinking mlock(), but you have a point that mlockall() would be better!

I haven't done shared memroy before, but it looks pretty easy.

Thanks,

-kb