SimpleProducerConsumer
Description
This sample builds two applications:
- The consumer application opens a memory address that is shared between the RTX64 subsystem and windows. The program reads the shared memory address and then sets a globally named event to report that it has completed reading the data. The program will end when a TERMINATE_EVENT is signaled.
- The producer application creates and writes to a globally named shared memory address. The program writes the shared memory address and then sets a globally named event to report it has completed writing the data. The program will run for a set amount of iterations and then set a TERMINATE_EVENT. Outside of the loop it will report on the performance of each exchange.
Source Files
SimpleIPCConsumer.c– the main source file for Consumer.SimpleIPCProducer.c– the main source file for Producer.SimpleIPCConsumer.h– the header file for Consumer.SimpleIPCProducer.h– the header file for Producer.ProducerConsumer.h– a header file that is shared between the two applications
Setting up the SimpleProducerConsumer Sample
Build SimpleIPCProducer and SimpleIPCConsumer using any of the supported build configurations.
Running the SimpleProducerConsumer Sample
- Run SimpleIPCProducer as either an .exe or an .rtss
- Run SimpleIPCConsumer as either an .exe or an .rtss
APIs Referenced
| RTAPI |