Simple Data Exchange

Description

The sample detects whether an event is open or not. If the event is not open the program creates an event and adds a string to shared memory. It then waits. You then must run the program a second time. This process will find the event, read the string form the shared memory signal to the other program that it has completed, and then shut itself down. The other program having been signaled will also shut itself down

Source Files

SimpleDataExchange.rtss project source file:

Setting up the SimpleDataExchange test

Build SimpleDataExchange.rtss or SimpleDataExchange.exe

Running SimpleDataExchange

You must have 2 or more cores assigned to RTX or Windows in order for this sample to demonstrate the use of multiple cores for either side.

APIs Referenced

RtGetCurrentProcessorNumber

CreateThread

RtGetProcessAffinityMask

RtSetProcessAffinityMask

ResumeThread

RtWaitForMultipleObjects

RtCloseHandle

RtOpenSharedMemory

IntervalZero.com | Support | Give Feedback