Race during the first use of pthread_rwlock_{rd,wr}lock from PTHREAD_RWLOCK_INITIALIZER

Mark Geisert mark@maxrnd.com
Sat Oct 3 08:15:21 GMT 2026


On 10/3/2026 1:12 AM, Mark Geisert via Cygwin wrote:
> I've tried to fix the behavior you're seeing in two ways.  First by 
> using ::is_initialized(rwlock) and second by seeing if *rwlock == 
> PTHREAD_RWLOCK_INITIALIZER, each while holding rwlock_initialization_lock.
That should be ::is_initializer(rwlock)

..mark


More information about the Cygwin mailing list