I need to port RTAI code to RTDM, which uses rtai_kmalloc and rtai_malloc for usr/usr and usr/kernel shared memory segments
they might be allocated by kernel or usermode first, and both kernel and userland should have an identical view; tracking between kernel and userland is in place (which module/process uses a shared segment, and 'used in kernel or not') userland might map a part of an existing shm segment, unmap it, and later map a larger part of same segment Now, rtdm_mmap_to_user() gives me kernel->user mapping, but not user->kernel, nor user->user; all three are provided by rtai_kmalloc/rtai_malloc through the name argument (int) does the following rtai_kmalloc/rtai_malloc replacement make sense? - allocation _always_ happens in-kernel by kmalloc -- directly in-kernel as needed, recording name and size - for userland: through an RTDM ioctl to allocate by name/size ---driver checks if name unallocated -- allocates with kmalloc if name not existent, recording name and and address - a separate RTDM ioctl to map a segment by name/size to userspace - Michael _______________________________________________ Xenomai mailing list [email protected] http://www.xenomai.org/mailman/listinfo/xenomai
