[previous] [index] [next]

Example 6: Shared Memory Communication Between RTL and Linux

This example demonstrates the use of "shared memory" to communicate between RT Linux tasks and normal Linux processes. Shared memory is exactly that, memory shared between two or more tasks or processes. It is analogous to Unix "interprocess communication" (IPC) shared memory.

Refer to the commented real-time task source code and commented Linux process source code for the details.

Principle of Operation

Creating Shared Memory

Deleting Shared Memory

Running the Demo

To run the demo, change to the 'ex06_shm' subdirectory of the top-level tutorial directory, and run the 'run' script by typing
./run
Alternatively, change to the top-level tutorial directory and run the 'runall' script there by typing
./runall
and selecting the "Shared Memory" button. You'll see diagnostics messages printing out.

See the Real-Time Task Code

See the Linux Application Code


Next: Example 7, RTL Semaphores

Back: Example 5, Interrupt Service Routine