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>
This commit is contained in:
committed by
Damien George
parent
40e1c111e1
commit
4bcbe88e74
@@ -48,6 +48,12 @@ void mp_thread_mutex_init(mp_thread_mutex_t *mutex);
|
||||
int mp_thread_mutex_lock(mp_thread_mutex_t *mutex, int wait);
|
||||
void mp_thread_mutex_unlock(mp_thread_mutex_t *mutex);
|
||||
|
||||
#if MICROPY_PY_THREAD_RECURSIVE_MUTEX
|
||||
void mp_thread_recursive_mutex_init(mp_thread_recursive_mutex_t *mutex);
|
||||
int mp_thread_recursive_mutex_lock(mp_thread_recursive_mutex_t *mutex, int wait);
|
||||
void mp_thread_recursive_mutex_unlock(mp_thread_recursive_mutex_t *mutex);
|
||||
#endif
|
||||
|
||||
#endif // MICROPY_PY_THREAD
|
||||
|
||||
#if MICROPY_PY_THREAD && MICROPY_PY_THREAD_GIL
|
||||
|
||||
Reference in New Issue
Block a user