All of lore.kernel.org
 help / color / mirror / Atom feed
* ASYNC IO using RT Signals
@ 2005-03-22 22:18 Bharath Ramesh
  0 siblings, 0 replies; only message in thread
From: Bharath Ramesh @ 2005-03-22 22:18 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 939 bytes --]

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.

Thanks,

Bharath

---
Bharath Ramesh       <bramesh@vt.edu>       http://csgrad.cs.vt.edu/~bramesh


[-- Attachment #2: patch --]
[-- Type: text/plain, Size: 457 bytes --]

--- linux-2.6.10/fs/fcntl.c.orig	2004-12-24 16:35:01.000000000 -0500
+++ linux-2.6.10/fs/fcntl.c	2005-03-22 14:30:14.298415152 -0500
@@ -469,7 +469,7 @@ static void send_sigio_to_task(struct ta
 			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:

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-03-22 22:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-22 22:18 ASYNC IO using RT Signals Bharath Ramesh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.