summaryrefslogtreecommitdiff
path: root/supervisor/shared/background_callback.c
AgeCommit message (Collapse)Author
2020-07-20background callbacks: Clear any callbacks that were queuedJeff Epler
Before this, a background callback that was on the list when background_callback_reset was called could have ended up in a state that made it "un-queueable": its "prev" pointer could have been non-NULL.
2020-07-17background_callback_gc_collect: We must traverse the whole listJeff Epler
2020-07-17background_callback: Add gc collect callbackJeff Epler
A background callback must never outlive its related object. By collecting the head of the linked list of background tasks, this will not happen. One hypothetical case where this could happen is if an MP3Decoder is deleted while its callback to fill its buffer is scheduled.
2020-07-15background_callback: Avoid CALLBACK_CRITICAL_BEGIN with nothing to doJeff Epler
CALLBACK_CRITICAL_BEGIN is heavyweight, but we can be confident we do not have work to do as long as callback_head is NULL. This gives back performance on nRF.
2020-07-15supervisor: Add a linked list of background callbacksJeff Epler
In time, we should transition interrupt driven background tasks out of the overall run_background_tasks into distinct background callbacks, so that the number of checks that occur with each tick is reduced.