rwlock different behavior on glibc 2.28 then on previous versions
Florian Weimer
fweimer@redhat.com
Fri Mar 11 13:58:51 GMT 2022
* David Mozes:
> On the previous version of Glibc (before the commit) We could release
> write lock with different thread as the one that owned the lock (If we
> like) .
Sorry, this misuse of the API has always been undefined according to
POSIX (“Results are undefined if the read-write lock rwlock is not held
by the calling thread.”).
> This is help very much for async program that has a many threads that
> communicate with some target. And we like to define a call back
> function instead of blocking on aio thread that send the data in order
> to release the rwlock.this improves the performance dramatically .
Could you use a different synchronization object (perhaps a condition
variable)?
Thanks,
Florian
More information about the Libc-help
mailing list