IPCLatency Sample

Source files for measuring the latency for switching between two threads.

Source Files

File Description
IPCLatency.c The main source file.

Building the Sample

Build the sample in any of the four available configurations: Debug, Release (to build IPCLatency.exe) or RTSSDebug, RTSSRelease (to build IPCLatency.rtss).

Running the Sample

Start the Subsystem through wRTOS Settings or wRTOS Control Panel, and then run this command:

RTSSrun IPCLatency.rtss [options]

Options

Option

Description

Default

-t <num>

Trip method:

  • 1 = Event
  • 2 = Mutex
  • 3 = Semaphore
  • 4 = Yield
  • 5 = Priority
  • 6 = No Trip
  • 7 = Release Semaphore

1

-i <num>

Outer loop count (test rounds)

1000

-j <num>

Inner loop count (iterations per round)

10000

-d <num>

Delay between outer loops (ms)

30

-m <num>

Pentium speed estimate (for ns conversion)

200

Expected Results

Remarks

APIs Referenced

RTAPI