I received this reply from Johnny Eriksson <bygg@swip.net>:
Implement a new set of signals, one for each possible file. Access
this with a macro, SIGFILE(), making the user code something like:
{
FILE * myfile;
/* ... */
signal(SIGFILE(myfile), myhandler);
}
The macro SIGFILE should be defined like:
#define SIGFILE(fp) (-1 - (fileno(fp)))
In the kernel, a table (one entry per file) is needed, and the code
that normally generates the SIGIO signal should first check if there
is a file-specific handler in that table, and if so use that handler,
if not generate a normal SIGIO. This makes SIGIO a catch-all handler
for all files that does not have a SIGFILE handler.
-- End reply from Johnny Eriksson --
/Magnus
map@stacken.kth.se
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html