QNX IPC: Samples - Only Open SharedMemLib Once
authorAngela Stegmaier <angelabaker@ti.com>
Fri, 3 May 2013 14:09:33 +0000 (09:09 -0500)
committerAngela Stegmaier <angelabaker@ti.com>
Sat, 4 May 2013 15:48:55 +0000 (10:48 -0500)
commitb5fe1a96854c44dead7f8a3e126c7d3d18479637
tree4e80a972dc4b8568438e334ee1af36fe820627a5
parent57ff1d8d568b0b54538f1f508d8ad87e72401a4b
QNX IPC: Samples - Only Open SharedMemLib Once

A race condition in the rpmsg-rpc stress test could
result in one thread trying to access a NULL pointer
as there was no protection around the call to
initialize the sharedmemallocator library functions.

To avoid the race condition, move the initialization
of the sharedmemallocator functions to the main function,
to happen only once.

Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
qnx/src/ipc3x_dev/ti/syslink/samples/hlos/rpmsg-rpc-stress/usr/tests_rpc_stress.c