On Apr 8 10:26, Jeremy Drake via Cygwin-patches wrote: > On Sun, 6 Apr 2025, Takashi Yano wrote: > > > Revised. > > Sorry to be late to the party (I didn't open the attachment before, and > only saw the commit): > > > + static class keys_list { > > + LONG64 seq; > > + LONG64 busy_cnt; > > Should these be `volatile`? busy_cnt is probably OK, it only seems to be > dealt with via Interlocked functions, but seq is tested directly in some > cases and via Interlocked in others.
One could think so, but... ...GLibc uses (basically) the same mechanism. It reads seq in pthread_key_create and pthread_key_delete without atomic access, and neither the global array keeping the key info, nor the seq struct member in there are marked volatile. Is there anything which makes our version different? Thanks, Corinna