diff options
author | Angus Gratton <angus@redyak.com.au> | 2024-12-10 14:50:42 +1100 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2025-02-03 15:02:02 +1100 |
commit | 4bcbe88e74de245fdee029b6a0746e3485d82a7e (patch) | |
tree | 400657f71958868f75558374efa3146394561dd3 /py/mpstate.h | |
parent | 40e1c111e17864044190596dff6d32955d11280c (diff) | |
download | micropython-4bcbe88e74de245fdee029b6a0746e3485d82a7e.tar.gz micropython-4bcbe88e74de245fdee029b6a0746e3485d82a7e.zip |
py: Add optional support for recursive mutexes, use for gc mutex.
Enabled by default if using threading and no GIL
This work was funded through GitHub Sponsors.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
Diffstat (limited to 'py/mpstate.h')
-rw-r--r-- | py/mpstate.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/py/mpstate.h b/py/mpstate.h index 51f290b55b..138c561730 100644 --- a/py/mpstate.h +++ b/py/mpstate.h @@ -145,7 +145,7 @@ typedef struct _mp_state_mem_t { #if MICROPY_PY_THREAD && !MICROPY_PY_THREAD_GIL // This is a global mutex used to make the GC thread-safe. - mp_thread_mutex_t gc_mutex; + mp_thread_recursive_mutex_t gc_mutex; #endif } mp_state_mem_t; |