Use native threading and locking APIs on Windows

Removes dependency on pthread library and uses fast Slim Reader/Writer (SRW) locks for NSLock/NSRecursiveLock/NSCondition/NSConditionLock as well as all internal locks. Adds GS_MUTEX_*() macros in GSPThread.h, that are being used for all internal locking instead of pthread APIs.

Also adds support for thread priorities on Windows, fixes method signature of +[NSThread setThreadPriority:] to match Apple platforms, and adds error handling in same method.
This commit is contained in:
Frederik Seiffert 2021-07-28 16:17:47 +02:00 committed by Frederik Seiffert
parent 3b8bbb00ba
commit abfe4e2a04
29 changed files with 1611 additions and 640 deletions

View file

@ -134,7 +134,7 @@ GS_EXPORT_CLASS
#if OS_API_VERSION(MAC_OS_X_VERSION_10_2,GS_API_LATEST) \
&& GS_API_VERSION( 10200,GS_API_LATEST)
+ (void) setThreadPriority: (double)pri;
+ (BOOL) setThreadPriority: (double)pri;
+ (double) threadPriority;
#endif