mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Robert P. J. Day" <rpjday@mindspring.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Florin Iucha <florin@iucha.net>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: "upping" a semaphore from interrupt context?
Date: Sat, 23 Jun 2007 08:06:37 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.4.64.0706230804060.4666@localhost.localdomain> (raw)
In-Reply-To: <200706231402.03617.arnd@arndb.de>

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1240 bytes --]

On Sat, 23 Jun 2007, Arnd Bergmann wrote:

> On Saturday 23 June 2007, Robert P. J. Day wrote:
> > On Fri, 22 Jun 2007, Arnd Bergmann wrote:
> > >
> > > yes, but you should not. The use of semaphores is not
> > > recommended for new code, it should be replaced with either a
> > > mutex or a completion.
> >
> > can you clarify this?  it sounds like you're saying that the
> > current implementation of semaphores is entirely superfluous.  but
> > surely it isn't possible to replace all semaphores with either
> > mutexes or completions, is it?
>
> No, not all of them, but the vast majority. There are multiple
> differences, the most important one being the 'counting' in
> semaphores.

right, that was exactly the feature i was thinking of.  ok, i'm clear
on this now -- while the *majority* of semaphores can be more properly
replaced by mutexes or completions, there will always be a need for a
general-purpose counting semaphore.

rday
-- 
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

http://fsdev.net/wiki/index.php?title=Main_Page
========================================================================

  reply	other threads:[~2007-06-23 12:10 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-22 17:38 Florin Iucha
2007-06-22 17:34 ` Arnd Bergmann
2007-06-23 11:52   ` Robert P. J. Day
2007-06-23 12:02     ` Arnd Bergmann
2007-06-23 12:06       ` Robert P. J. Day [this message]
2007-06-23 15:42       ` Satyam Sharma
2007-06-23 15:52         ` Oliver Neukum
2007-06-23 17:02           ` Satyam Sharma
2007-06-23 16:11         ` Robert P. J. Day
2007-06-23 17:16           ` Satyam Sharma
2007-06-24 15:25             ` Robert P. J. Day
2007-06-24 16:45               ` Satyam Sharma
2007-06-24 16:59                 ` Robert P. J. Day
2007-06-24 18:12                   ` Satyam Sharma
2007-06-22 17:50 ` Satyam Sharma

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=Pine.LNX.4.64.0706230804060.4666@localhost.localdomain \
    --to=rpjday@mindspring.com \
    --cc=arnd@arndb.de \
    --cc=florin@iucha.net \
    --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

all inboxes | Powered by JetHome®