Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use 1 select() call and let it block
vusb-daemon spends a lot of time looping since it has two separate select calls with short timeouts. Unify the two select calls and let it block to avoid needless CPU usage. xcdbus_pre_select is written to add to in-use fd_sets and nfds, so use that feature. xcdbus_post_select will loop over its registered watches checking for if the corresponding FD is set, so an extra FD in readfds is fine. udevfd can then be checked for events as is done currently. Signed-off-by: Jason Andryuk <jandryuk@gmail.com>
- Loading branch information