examples/vhost: clean switch worker
authorYuanhan Liu <yuanhan.liu@linux.intel.com>
Mon, 2 May 2016 21:23:49 +0000 (14:23 -0700)
committerYuanhan Liu <yuanhan.liu@linux.intel.com>
Tue, 10 May 2016 18:22:40 +0000 (20:22 +0200)
commit273ecdbc06a2fc09b0ac58b77b918a3f677c47a6
treef88a78ba4d67703c6fcb76e732fc2b62e7f52cb3
parentbdb19b771e6f849d828d34aff48c91c6a3030fe0
examples/vhost: clean switch worker

switch_worker() is the last piece of code that is messy yet it touches
virtio/vhost device.

Here do a cleanup, so that we will be less painful for later vhost ABI
refactoring.

The cleanup is straight forward: break long lines, move some code into
functions. The last, comment a bit on switch_worker().

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
examples/vhost/main.c