public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Christopher Smith <x@xman.org>
To: Dan Kegel <dank@kegel.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: A signal fairy tale
Date: Tue, 26 Jun 2001 20:56:27 -0700	[thread overview]
Message-ID: <33240000.993614187@hellman> (raw)
In-Reply-To: <3B38860D.8E07353D@kegel.com>

--On Tuesday, June 26, 2001 05:54:37 -0700 Dan Kegel <dank@kegel.com> wrote:
> Once upon a time a hacker named Xman
> wrote a library that used aio, and decided
> to use sigtimedwait() to pick up completion
> notifications.  It worked well, and his I/O
> was blazing fast (since was using a copy
> of Linux that was patched to have good aio).
> But when he tried to integrate his library
> into a large application someone else had
> written, woe! that application's use of signals
> conflicted with his library.  "Fsck!" said Xman.
> At that moment a fairy appeared, and said
> "Young man, watch your language, or I'm going to
> have to turn you into a goon!  I'm the good fairy Eunice.
> Can I help you?"  Xman explained his problem to Eunice,
> who smiled and said "All you need is right here,
> just type 'man 2 sigopen'".  Xman did, and saw:

I must thank the god fair Eunice. ;-) From a programming standpoint, this 
looks like a really nice approach. I must say I prefer this approach to the 
various "event" strategies I've seen to date, as it fixes the primary 
problem with signals, while still allowing us to hook in to all the 
standard POSIX API's that already use signals. It'd be nice if I could pass 
in a 0 for signum and have the kernel select from unused signals (problem 
being that "unused" is not necessarily easy to define), althouh I guess an 
inefficient version of this could be handled in userland.

I presume the fd could be shared between threads and otherwise behave like 
a normal fd, which would be sooooper nice.

I guess the main thing I'm thinking is this could require some significant 
changes to the way the kernel behaves. Still, it's worth taking a "try it 
and see approach". If anyone else thinks this is a good idea I may hack 
together a sample patch and give it a whirl.

Thanks again good fairy Dan/Eunice. ;-)

--Chris


  reply	other threads:[~2001-06-27  3:58 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-26 12:54 A signal fairy tale Dan Kegel
2001-06-27  3:56 ` Christopher Smith [this message]
2001-06-27  6:21 ` Balbir Singh
2001-06-27 18:11   ` Christopher Smith
2001-06-28  3:28     ` Balbir Singh
2001-06-27  9:18 ` Jamie Lokier
2001-06-27 18:16   ` Christopher Smith
2001-06-28 12:58 ` John Fremlin
2001-06-28 16:21   ` Jamie Lokier
2001-06-29  8:22 ` Christopher Smith
2001-06-29 11:47   ` John Fremlin
  -- strict thread matches above, loose matches on Subject: below --
2001-06-28  2:49 Daniel R. Kegel
2001-06-29  8:18 ` Christopher Smith
2001-06-29  9:05   ` Dan Kegel
2001-06-28  2:57 Daniel R. Kegel
2001-06-29  8:19 ` Christopher Smith
2001-06-29  9:29   ` Dan Kegel
2001-06-29 18:46     ` Dan Kegel
2001-07-02 22:33       ` Christopher Smith
2001-06-28  3:04 Daniel R. Kegel
2001-06-28 14:46 ` Jamie Lokier
2001-06-28 20:11 Daniel R. Kegel
2001-06-29  8:31 ` Christopher Smith
     [not found] <fa.d69j5vv.ej8irj@ifi.uio.no>
     [not found] ` <fa.h2rpibv.87m5bp@ifi.uio.no>
2001-06-28 14:59   ` Dan Maas
2001-06-28 15:21     ` Alan Cox
2001-06-29  8:26   ` Christopher Smith
2001-06-29 11:56     ` Chris Wedgwood
2001-06-30 10:02     ` Jan Hudec

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=33240000.993614187@hellman \
    --to=x@xman.org \
    --cc=dank@kegel.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