在 2026-10-22 10:46, LIU Hao 写道:
在 2026-10-22 02:56, Luca Bacci 写道:See previous commit about pthread_mutex_t. --- .../winpthreads/src/spinlock.c | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-)Claude Opus 5.5 still says there's potential deadlock. I think the reason is that `SetEvent()` is called after the state has been changed to `Unlocked` so it happens outside the critical section. Perhaps we need another state for it.
An alternative approach is to make `WinpthreadsMutex` reference-counted, which will only be needed by `pthread_mutex_unlock()` and `pthread_mutex_destroy()`.
-- Best regards, LIU Hao
OpenPGP_signature.asc
Description: OpenPGP digital signature
_______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
