diff options
author | David Lechner <david@pybricks.com> | 2020-01-09 16:35:13 -0600 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2020-01-12 13:27:04 +1100 |
commit | 339d0816c55a0c62ec9be810dd3a58d36b952510 (patch) | |
tree | 625f950e32d0eb420fd78d43a35ccc166eb4103b /py/nativeglue.c | |
parent | 853aaa06f24c98191a44a38eedd4ec2a0e63d3eb (diff) |
py/runtime: Move MICROPY_PORT_INIT_FUNC near the end of mp_init().
This moves the MICROPY_PORT_INIT_FUNC hook to the end of mp_init(), just
before MP_THREAD_GIL_ENTER(), so that everything (in particular the GIL
mutex) is intialized before the hook is called. MICROPY_PORT_DEINIT_FUNC
is also moved to be symmetric (but there is no functional change there).
If a port needs to perform initialisation earlier than
MICROPY_PORT_INIT_FUNC then it can do it before calling mp_init().
Diffstat (limited to 'py/nativeglue.c')
0 files changed, 0 insertions, 0 deletions