Hello, Sergey Bugaev, le mar. 07 sept. 2021 16:33:22 +0300, a ecrit: > diff --git a/htl/Versions b/htl/Versions > index 4aea321016..4e0ebac285 100644 > --- a/htl/Versions > +++ b/htl/Versions > @@ -132,25 +122,25 @@ __pthread_alloc (struct __pthread **pthread) > } > > retry: > - __pthread_rwlock_wrlock (&__pthread_threads_lock); > + lll_lock (GL (dl_pthread_threads_lock), LLL_PRIVATE);
Please rather use __libc_rwlock_wrlock etc. Even if for now they are actually locks and not rwlocks, the day we fix that the rwlocking of dl_pthread_threads_lock will get fixed alongside. > - /* Store a pointer to this thread in the thread ID lookup table. We > - could use __thread_setid, however, we only lock for reading as no > - other thread should be using this entry (we also assume that the > - store is atomic). */ > - __pthread_rwlock_rdlock (&__pthread_threads_lock); > - __pthread_threads[pthread->thread - 1] = pthread; > - __pthread_rwlock_unlock (&__pthread_threads_lock); > + /* Store a pointer to this thread in the thread ID lookup table. */ > + __pthread_setid (pthread->thread, pthread); We still want to optimize for read-lock. Apart from this it looks good, thanks! Samuel
