Patch 1: remove old, commented out typedef for `pthread_t`.

Patch 2: move `SIG_BLOCK`, `SIG_UNBLOCK` and `SIG_SETMASK` from pthread.h to 
pthread_signal.h. Also include pthread_signal.h from pthread.h when compiling 
with MSVC.

Please note that pthread_signal.h is also included from mingw-w64's signal.h.

Patch 3: remove macro `USE_SEM_CriticalSection_SpinCount` from semaphore.h. I 
do not know what was the use of this macro before, but it is not referenced 
anywhere in the source files.

pthread.h seems to expose some internal functions, I could look more into it 
when I get time.

I also took a look at `tests_pthread` subdirectory. All tests seem to be simple 
return-code based tests which can be integrated with Automake's `TESTS`. 
However, some of them do not compile with recent GCC because some warnings are 
errors now by default. Also, some tests do not compile with MSVC as they use 
`pthread_t` as if it was an old struct removed in patch 1.

I don't know if anyone uses these tests the way the are now, so I think 
integrating them with Automake could be useful.

- Kirill Makurin

_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to