在 2026-5-14 23:15, Kirill Makurin 写道:
Do you think we can improve the while loop in `pthread_spin_lock` or we can 
keep it as-is? I believe you and other people on the list are more familiar 
with this kind of stuff than I am. My primary goal is to provide 
POSIX-conformant implementation.

There's a report saying that it takes significant time: https://github.com/msys2/MINGW-packages/issues/29108#issuecomment-4384999469

So maybe it's worth doing. However, as said earlier, I think this is not a very good implementation. A user-mode thread should not spin dead; it needs to be nice (!) to the scheduler.


I think supporting `PTHREAD_PROCESS_SHARED` in winpthreads was the last thing 
most people cared about, and I think this is true today as well. For example, 
we still use `CRITICAL_SECTION` in implementation of `pthread_cond_t`, so with 
the current state of the library, support for `PTHREAD_PROCESS_SHARED` is out 
of question.
Yes.



--
Best regards,
LIU Hao

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to