public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Roland Dreier <roland@topspin.com>
To: Brandon Corey <bcorey@engr.sgi.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Pollable Semaphores
Date: Fri, 21 Jan 2005 13:37:47 -0800	[thread overview]
Message-ID: <521xceqx90.fsf@topspin.com> (raw)
In-Reply-To: <20050121212212.GA453910@firefly.engr.sgi.com> (Brandon Corey's message of "Fri, 21 Jan 2005 13:22:12 -0800")

    Brandon> I'm trying to find out if there is a pollable semaphore
    Brandon> equivalent on Linux.  The main idea of a "pollable
    Brandon> semaphore", is a semaphore with a related file
    Brandon> descriptor.  The file descriptor can be used to select()
    Brandon> when the semaphore is acquirable.  This provides a
    Brandon> convenient way for users to implement code
    Brandon> synchronization between threads, where multiple file
    Brandon> descriptors are already being selected against.

Yes, I believe futexes and specifically FUTEX_FD can be used to
implement this.  See http://people.redhat.com/~drepper/futex.pdf for
full details.

 - Roland

  reply	other threads:[~2005-01-21 21:41 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-21 21:22 Pollable Semaphores Brandon Corey
2005-01-21 21:37 ` Roland Dreier [this message]
2005-01-21 23:17   ` Brent Casavant
2005-01-22  3:43     ` Ulrich Drepper
2005-01-22  5:52       ` Chris Wright
2005-01-22  7:05         ` Chris Wright
2005-01-22  7:39           ` Ulrich Drepper
2005-01-22 18:02             ` Chris Wright
2005-01-24 20:42       ` Robert White
2005-01-22  0:07 ` Davide Libenzi

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=521xceqx90.fsf@topspin.com \
    --to=roland@topspin.com \
    --cc=bcorey@engr.sgi.com \
    --cc=linux-kernel@vger.kernel.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