You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
py/mphal: Declare the shared wake descriptor that extmod calls.
extmod/modselect.c reaches mp_hal_wake_event_fd() and
mp_hal_wake_event_drain() when it has no per-thread wake object to inject,
but both were declared only in ports/unix/mphalport.h. Portable code was
calling a port-private entry point that no contract described, and the two
sides did not even agree on when it existed: modselect tested the
descriptor capability while the port tested the wake-object one.
They are now declared in py/mphal.h behind MICROPY_HAL_HAS_WAKE_EVENT_FD,
which a port sets when its shared wake primitive can offer a descriptor.
The capability is independent of the wake-object one rather than its
negation, because a port may have neither: a wake object with no
descriptor is what an event register or a task notification looks like.
That combination now selects the third branch and falls back to the
period-capped sweep, where before it failed to compile.
Signed-off-by: Andrew Leech <andrew@alelec.net>
0 commit comments