Skip to contentSkip to conversation

rt_heap_bind in kernel module

Xenomai-help Stefan Eletzhofer 2 participants 2 messages Apr 20, 2006

lore
Share & tools
lore
#0 lore raw

Hi,
reading the API docs (2.1.0) of the xenomai native API I noticed that the rt_heap_bind() call is a userspace-only call and i'm wondering why that is the case? Or am I missing something here?

I'm in the process of porting applications which use the RTAI shm module in both user space and kernel space; these applications basically allocate the shared memory chunks in user space and then have kernel modules dump data into these areas.

To port things, I've coded a rt_heap_bind() for kernel space modelled after the code in skins/native/syscalls.c using the nucleus registry API, and that seems to work. So, is this missing call just laziness, then I'd post a patch.

Thanks,
Stefan E.

Signature · 9 lines
Stefan Eletzhofer
InQuant GmbH
Bahnhofstraße 11
D-88214 Ravensburg
http://www.inquant.de
http://www.eletztrick.de
+49 (0) 751 35 44 112
+49 (0) 171 23 24 529 (Mobil)
+49 (0) 751 35 44 115 (FAX)
#1 lore raw
Quoted 4 lines · Stefan Eletzhofer

Hi,
reading the API docs (2.1.0) of the xenomai native API I noticed that the rt_heap_bind() call is a userspace-only call and i'm wondering why that is the case? Or am I missing something here?

Binding op are not supported in kernel space, basically because one sees a single address space there, and it's always possible to share the original object descriptor directly between modules as a plain memory area. The synchronization the binding ops provide between the creator and the users of a given resource has been ignored for kernel space.

Quoted 16 lines

I'm in the process of porting applications which use the RTAI shm module
in both user space and kernel space; these applications basically allocate the shared memory chunks in user space and then have kernel modules dump data into these areas.

To port things, I've coded a rt_heap_bind() for kernel space modelled after the code in skins/native/syscalls.c using the nucleus registry API, and that seems to work. So, is this missing call just laziness, then I'd post a patch.

Thanks,
Stefan E.

------------------------------------------------------------------------

_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help

Signature · 1 line
Philippe.