tree fdf3a3d0f4168f4901f088832ea04d3dbc9c8c4e
parent 2c9d72ca3d99fef00f1ab2228e4e7163a782dd11
author Bharath Ramesh <[EMAIL PROTECTED]> Tue Apr 12 08:26:09 2005
committer Linus Torvalds <[EMAIL PROTECTED]> Tue Apr 12 08:26:09 2005

[PATCH] AYSNC IO using singals other than SIGIO

A question on sigwaitinfo based IO mechanism in multithreaded applications.

I am trying to use RT signals to notify me of IO events using RT signals
instead of SIGIO in a multithreaded applications.  I noticed that there was
some discussion on lkml during november 1999 with the subject of the
discussion as "Signal driven IO".  In the thread I noticed that RT signals
were being delivered to the worker thread.  I am running 2.6.10 kernel and
I am trying to use the very same mechanism and I find that only SIGIO being
propogated to the worker threads and RT signals only being propogated to
the main thread and not the worker threads where I actually want them to be
propogated too.  On further inspection I found that the following patch
which I have attached solves the problem.

I am not sure if this is a bug or feature in the kernel.


Roland McGrath <[EMAIL PROTECTED]> said:

This relates only to fcntl F_SETSIG, which is a Linux extension.  So there is
no POSIX issue.  When changing various things like the normal SIGIO signalling
to do group signals, I was concerned strictly with the POSIX semantics and
generally avoided touching things in the domain of Linux inventions.  That's
why I didn't change this when I changed the call right next to it.  There is
no reason I can see that F_SETSIG-requested signals shouldn't use a group
signal like normal SIGIO does.  I'm happy to ACK this patch, there is nothing
wrong with its change to the semantics in my book.  But neither POSIX nor I
care a whit what F_SETSIG does.

Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>

 fcntl.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

Index: fs/fcntl.c
===================================================================
--- 946b78d06c3ce55e5628f1e5ad3c5e1fc726f5d4/fs/fcntl.c  (mode:100644 
sha1:a7b5300d9d5f920f93c9c5eba1e199bacb7ed1ba)
+++ fdf3a3d0f4168f4901f088832ea04d3dbc9c8c4e/fs/fcntl.c  (mode:100644 
sha1:dfb60cc2bd5e8e6bcb1ad82920c6e092d142a687)
@@ -437,7 +437,7 @@
                        else
                                si.si_band = band_table[reason - POLL_IN];
                        si.si_fd    = fd;
-                       if (!send_sig_info(fown->signum, &si, p))
+                       if (!send_group_sig_info(fown->signum, &si, p))
                                break;
                /* fall-through: fall back on the old plain SIGIO signal */
                case 0:
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to