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/mpconfig.h | |
| parent | 40e1c111e17864044190596dff6d32955d11280c (diff) | |
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/mpconfig.h')
| -rw-r--r-- | py/mpconfig.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/py/mpconfig.h b/py/mpconfig.h index e84d258a1..64138a9ea 100644 --- a/py/mpconfig.h +++ b/py/mpconfig.h @@ -1629,6 +1629,11 @@ typedef double mp_float_t; #define MICROPY_PY_THREAD_GIL_VM_DIVISOR (32) #endif +// Is a recursive mutex type in use? +#ifndef MICROPY_PY_THREAD_RECURSIVE_MUTEX +#define MICROPY_PY_THREAD_RECURSIVE_MUTEX (MICROPY_PY_THREAD && !MICROPY_PY_THREAD_GIL) +#endif + // Extended modules #ifndef MICROPY_PY_ASYNCIO |
