Skip to content

mp_sched_schedule_node vs mp_sched_schedule #9855

Discussion options

You must be logged in to vote

In summary - mp_sched_schedule is for running a Python function in the scheduler. The most common use case is to execute a soft IRQ handler. mp_sched_schedule_node is for running a C function, typically some sort of background task (bluetooth, networking, usb, etc).

Importantly there are only a fixed number of pre-allocated slots for mp_sched_schedule, whereas with mp_sched_schedule_node the calling code provides the linked list node.

mp_sched_schedule_node looks like it prevents reentering to an IRQ user function and looks safer for the end user.

It's really just about the use case -- before mp_sched_schedule_node, background tasks implemented in C had to create a "fake" Python functio…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by IhorNehrutsa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants