poller: Fix async poller
The async poller does not work as expected since it can happen that
the async poller is removed from the list of pollers while we are
iterating over the list. Even list_for_each_entry_safe does not help
here since we may remove the next list element, but
list_for_each_entry_safe only allows to remove the current list element.

Rework the async poller so that it is registered with the poller
framework on registration and then is only marked as active with
poller_call_async(). This way we do not have to do list manipulations
while running the pollers.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent 96b115b commit efd9601e15b030317eeda1618985bac34ebfcb9a
@Sascha Hauer Sascha Hauer authored on 12 Jan 2016
Showing 2 changed files
View
common/poller.c
View
include/poller.h