runqueue: fix use-after-free bug Calling t->complete in runqueue_task_complete can free the memory associated with t. Change the runqueue_start_next accordingly. Fixes https://github.com/openwrt/openwrt/issues/493 Signed-off-by: Felix Fietkau <nbd@nbd.name>
libubox: runqueue: Cancel task timeout when completeing task Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
runqueue: add a function that allows adding jobs to the front of the runqueue Signed-off-by: John Crispin <blogic@openwrt.org>
runqueue should cal the complete handler from more places Signed-off-by: John Crispin <blogic@openwrt.org>
runqueue: move completion handler from runqueue_process to runqueue_task to make it more generic Signed-off-by: Felix Fietkau <nbd@openwrt.org>
runqueue: add a simple task queueing/completion tracking implementation Signed-off-by: Felix Fietkau <nbd@openwrt.org>