latency: fix calculation for multi-thread
authorReshma Pattan <reshma.pattan@intel.com>
Thu, 5 Dec 2019 17:18:11 +0000 (17:18 +0000)
committerThomas Monjalon <thomas@monjalon.net>
Mon, 20 Jan 2020 00:32:50 +0000 (01:32 +0100)
commit2a178702c00f2a8b547358fedc7107d376f8825e
treec0009118dd6110df8aa67be180f612ac5d008460
parentf6320e3c1195f25f16d84a37bc2ecdec98b199d3
latency: fix calculation for multi-thread

Make latency calculation multithread safe by
using spinlock.

Fixes: 5cd3cac9ed ("latency: added new library for latency stats")
Cc: stable@dpdk.org
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
lib/librte_latencystats/rte_latencystats.c