net/ena: handle spurious wakeups in wait event
authorStanislaw Kardach <kda@semihalf.com>
Tue, 11 May 2021 06:45:50 +0000 (08:45 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 11 May 2021 13:00:44 +0000 (15:00 +0200)
commit072b9f2bbc2402a8c86194fe9e11458c1605540a
tree075e0495ba32b501fb01c4c21acf905db596b93e
parent07ebd5dd9800bdcac018d9a89010c75051ab6484
net/ena: handle spurious wakeups in wait event

pthread_cond_timedwait() may spuriously wakeup according to POSIX.
Therefore it is required to check whether predicate is actually true
before finishing the waiting loop.

Signed-off-by: Stanislaw Kardach <kda@semihalf.com>
Reviewed-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Shay Agroskin <shayagr@amazon.com>
drivers/net/ena/base/ena_plat_dpdk.h