fix data race choosing next key slot in pthread_key_create
commit 84d061d5 wrongly moved the access to the global next_key outside of the scope of the lock. the error manifested as spurious failure to find an available key slot under concurrent calls to pthread_key_create, since the stopping condition could be met after only a small number of slots were examined.
Showing
想要评论请 注册 或 登录