diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2012-02-29 22:11:53 +0100 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2012-04-16 23:51:15 +0200 |
commit | e21f38fba0a5c61cc155dcf22be5df13140a0098 (patch) | |
tree | 10fa9e09fdbfb24e685d72164d20b33740b5595f | |
parent | 5711fe33dfbe5806e867f525b1bdbf2076251ec7 (diff) |
events: Make the event loop reusable
Set the done flag to false before starting the loop in order to make it
possible for the caller to restart the loop.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-rw-r--r-- | events.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -131,6 +131,8 @@ static void events_dispatch(struct events *events, const fd_set *rfds, bool events_loop(struct events *events) { + events->done = false; + while (!events->done) { struct timeval timeout; fd_set rfds; |