public inbox for libc-help@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: David Mozes <david.mozes@silk.us>
Cc: "libc-help@sourceware.org" <libc-help@sourceware.org>
Subject: Re: rwlock different behavior on glibc 2.28 then on previous versions
Date: Fri, 11 Mar 2022 14:58:51 +0100	[thread overview]
Message-ID: <87czis1tgk.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <AM9PR04MB82916263FDAD1DB3221E89ABF1089@AM9PR04MB8291.eurprd04.prod.outlook.com> (David Mozes's message of "Mon, 7 Mar 2022 20:13:26 +0000")

* 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


  reply	other threads:[~2022-03-11 13:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-07 20:13 David Mozes
2022-03-11 13:58 ` Florian Weimer [this message]
2022-03-13 10:23   ` David Mozes
2022-03-20 16:44     ` David Mozes
2022-03-21  6:19       ` Christian Hoff
2022-03-21 14:01         ` David Mozes
2022-03-21 17:01           ` Adhemerval Zanella
2022-03-21 19:46             ` David Mozes
2022-03-21 20:19               ` Adhemerval Zanella
2022-03-24 15:41                 ` David Mozes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87czis1tgk.fsf@oldenburg.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=david.mozes@silk.us \
    --cc=libc-help@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).