@brief Wait for events on a set of lines. @param bulk Set of GPIO lines to monitor. @param timeout Wait time limit. @param event_bulk Bulk object in which to store the line handles on which events occurred. Can be NULL. @return 0 if wait timed out, -1 if an error occurred, 1 if at least one event occurred.