virt: Add exit condition in notif-thread loop
authorRadoslaw Jablonski <radoslawx.jablonski@intel.com>
Mon, 23 Apr 2018 06:32:35 +0000 (07:32 +0100)
committerRadoslaw Jablonski <radoslawx.jablonski@intel.com>
Tue, 24 Apr 2018 11:13:37 +0000 (12:13 +0100)
commit8be68899787276bcd55bf984cad1bea8d49add47
treeef417881fc975ec49a093324edafb419074242b5
parent0a00498519b0fcb15bb4514823003a71d23afa56
virt: Add exit condition in notif-thread loop

Previously thread was stopped using pthread_cancel() call.
Now introduced state variable to track thread active state.

This patch fixes warning about 'infinite loop without
exit condition' generated by Klocwork static analisys.

Change-Id: Ifbaf1dacf422ad6a2a11057e6475c4320c709f33
Signed-off-by: Radoslaw Jablonski <radoslawx.jablonski@intel.com>
src/virt.c