bus/vdev: add lock on device list
authorJianfeng Tan <jianfeng.tan@intel.com>
Tue, 24 Apr 2018 05:51:21 +0000 (05:51 +0000)
committerThomas Monjalon <thomas@monjalon.net>
Tue, 24 Apr 2018 10:33:22 +0000 (12:33 +0200)
commit35f462839b699960b6f152ba99ac23f944315615
tree19df5a324a29691754272ad97acefdfd6f2712a2
parent79967252c3b233be2006c6f79fc2aa4ab1f8af0f
bus/vdev: add lock on device list

As we could add virtual devices from different threads now, we
add a spin lock to protect the vdev device list.

Suggested-by: Anatoly Burakov <anatoly.burakov@intel.com>
Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Reviewed-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
drivers/bus/vdev/vdev.c