On Thu, Mar 12, 2020 at 11:36:15PM +0100, Daniel Glöckner wrote: > Hello Sascha, > > On Thu, Mar 12, 2020 at 09:35:55AM +0100, Sascha Hauer wrote: > > This adds a slice to each poller which is acquired before the poller is > > executed. This allows us to run pollers inside of other pollers. > > ok, so in the UDP fastboot case there is now a poller that receives > packets and a poller that executes commands and needs packets to > be received to send more than one message. How do I make sure that > the fastboot poller will never be called inside the net poller since > that would cause a deadlock? > > My initial idea was to keep the poller_active variable and increase > it for each poller execution level. The fastboot poller could then > return immediately when it is called from within any other poller. > > Another possible solution could be to add a dependency on the net > poller slice to the fastboot poller slice. Then the net poller > can execute from within the fastboot poller, but not the other way > around. A similar dependency would have to be added for the watchdog > poller_async and the poller that will be introduced for sending > keep-alives. > > The first solution should be easier to implement and would have > the benefit that all resources are available when a fastboot command > executes. I wonder if we need some idle slice, a slice that is locked once we are outside of some idle loop (shell is waiting for input). In the end the fastboot code may only call long running commands when the idle slice is not locked. Sascha -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox