3 ms·
C11 has a mutex API (threads.h), so why would it rely on POSIX? Are you sure it's not an runtime detail on one platform? https://devblogs.microsoft.com/cppblo
by kev009 11mo ago
C11 has a mutex API (threads.h), so why would it rely on POSIX? Are you sure it's not an runtime detail on one platform? https://devblogs.microsoft.com/cppblog/c11-threads-in-visual-studio-2022-version-17-8-preview-2/ https://devblogs.microsoft.com/cppblog/c11-threads-in-visual...
- loeg 11mo agoThe article has an excerpt using posix mutexes specifically. But you're right that C11 code can just portably use standard mutexes. // The old way of manual reference counting typedef struct { MatchStore* store; int ref_count; pthread_mutex_t mutex; } SharedStore;