bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH htl v3 2/5] htl: Move thread table to ld.so


From: Sergey Bugaev
Subject: Re: [PATCH htl v3 2/5] htl: Move thread table to ld.so
Date: Wed, 15 Sep 2021 17:14:00 +0300

On Wed, Sep 15, 2021 at 2:27 AM Samuel Thibault <samuel.thibault@gnu.org> wrote:
> Please rather use __libc_rwlock_wrlock etc.

Thanks, I did not realize there were actually more internal
synchronization primitives implemented on top of lll. I will send out
a new version shortly.

> 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.

May I ask, why are rwlocks unimplemented? Is it just that nobody has
done the work, or are there some unobvious complications?

I'm asking because I happen to have an implementation of rwlocks [0]
that works (passes the test) on the Hurd. It makes use of futex
bitsets (which don't seem to be supported by gsync), but seems to work
just fine without them. And HTL of course has its own rwlocks
implementation. Would it make sense to me to spend some time to try
and write a __libc_rwlock based on them, or are there some obstacles?

[0]: 
https://github.com/bugaevc/lets-write-sync-primitives/blob/master/src/rwlock.cpp

Sergey



reply via email to

[Prev in Thread] Current Thread [Next in Thread]