vhost: comment unwanted callback

add comment for potential unwanted callback on listenfds

Signed-off-by: Huawei Xie <huawei.xie@intel.com>
This commit is contained in:
Huawei Xie 2015-06-30 17:20:50 +08:00 committed by Thomas Monjalon
parent 292959c719
commit cca619e459

View File

@ -242,6 +242,13 @@ fdset_event_dispatch(struct fdset *pfdset)
pthread_mutex_unlock(&pfdset->fd_mutex);
/*
* When select is blocked, other threads might unregister
* listenfds from and register new listenfds into fdset.
* When select returns, the entries for listenfds in the fdset
* might have been updated. It is ok if there is unwanted call
* for new listenfds.
*/
ret = select(maxfds + 1, &rfds, &wfds, NULL, &tv);
if (ret <= 0)
continue;