|
Description
The Pppd sample is an RTDLL sample that creates Per-Process Private Data within the RTDLL.
Source Files
The Pppd example includes three projects:
RtdllExample.vcproj
/RtdllExample.c
contains the functions
SetCount
, GetCount
, and IncrementCount
that use per-process private data(PPPD), allocated
for each RTSS process.LoadRtdll.vcproj
/LoadRtdll.c
is a simple utility
to load a RTDLL. TestRtdl.vcproj
/TestRtdl.c
is a test that uses a
counter that belongs to the per-process private data in rtdll. Remarks
The rtdllexample.rtdll must be loaded first. This is done in two steps:
rtssrun /d /s RtdllExample.rtss
rtssrun LoadRtdll.rtss
The first steps registers the rtdll. The second step loads it. A user starts the test with
rtssrun TestRtdll.rtss
It is started again after few seconds. This causes two rtss processes to run simultaneously. The test runs for 30 seconds, and prints incrementing counter for each process.
NOTE: This sample can be run by using the batch file testrtdll.bat
.
APIs Referenced
Win32 APIs |