diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2018-05-21 16:29:33 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2018-05-21 16:33:38 +0300 |
commit | d93ee5f7009bbd81631bd7f8493486051a732a23 (patch) | |
tree | fd17d3cf9476cf9f033df7c3c3b5130a9599913b /events.h | |
parent | 72ec206080350e75a87780895f246f5c4f52e790 (diff) |
events: Extend the events_unwatch_fd() API with an event type
If a single file descriptor is being watch for multiple event types, it
will be present in multiple entries in the watch list. The
events_unwatch_fd() function will remove the first entry regardless of
its type, not allowing removal of a particular event type.
Fix this by extending the events_unwatch_fd() API to take an event type,
and remove the corresponding entry.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'events.h')
-rw-r--r-- | events.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -38,7 +38,7 @@ enum event_type { void events_watch_fd(struct events *events, int fd, enum event_type type, void(*callback)(void *), void *priv); -void events_unwatch_fd(struct events *events, int fd); +void events_unwatch_fd(struct events *events, int fd, enum event_type type); bool events_loop(struct events *events); void events_stop(struct events *events); |