From RTEMS to Linux :-(

Leon Pollak leonp at plris.com
Tue Mar 23 17:57:00 UTC 2010


On Tuesday March 23 2010, Gedare Bloom wrote:
> Linux programs are mainly stuck with the POSIX API to the kernel and
> whatever you can find in libraries (libc, etc) -- which are usually
> built on top of POSIX. Certain types of low-level operations, such as
> allocating physically contiguous memory, is not (to my knowledge)
> possible from within a user-land application and is not specified by
> POSIX.  There are kernel interfaces that provide such operations for
> kernel-mode code such as device drivers and kernel modules, but I
> don't think there are any user API functions to access them.
> 
> I would suggest formulating a set of questions specific to what you
> are trying to do, and then ask them on some appropriate Linux mailing
> lists (e.g. http://www.linux.org/docs/lists.html and
> linux-c-programming).  My guess is that most of the functionality you
> need is available somewhere in some library, but the trick is how to
> find it.  If you do need low-level functionality (i.e. hardware
> dependent) then you will probably have to write a kernel device
> driver.  There are also good resources online for how to do this, for
> example http://lwn.net/Kernel/LDD3/

Thank you, Gedare.

No, I almost do not need to do low level programming (and I understand just 
for now how to do it). My user space main program is in processing of data 
received from low level driver in several stages.
In RTEMS I should do it simple: create a partition, pull the buffer, give it 
to the driver to fill, pass it to the processing task(s) and free it at the 
end.
I found POSIX threads (look a bit awkward from RTEMS task point of view, but 
still usable), mailboxes and signals (analog of semaphores?). But no traces of 
something similar to partitions....
This made me think that I am on the wrong way...
-- 
Leon.



More information about the users mailing list