tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: SIGIO, siginfo



> On Jan 14,  1:24pm, yamt%mwd.biglobe.ne.jp@localhost (YAMAMOTO Takashi) wrote:
> -- Subject: Re: SIGIO, siginfo
> 
> | "man siginfo|grep -i sigio" shows nothing.
> | 
> | i'm wondering why it's this different from linux.
> | see the attached code.
> 
> I understand now. 
> 1. We get the wrong fd (the original fd, and not the dupped one where FASYNC
>    was set on), because in our current fd implementation the struct file is
>    shared, and there is no way to tell the difference. Even when we ASYNC
>    to the fd in the code, we already have lost the file descriptor index,
>    since we pass struct file * directly. Is this a problem? What does POSIX
>    say? I don't see an easy fix.

linux saves the descriptor number.
we can do the same if this interface is intended to be linux-compatibile.
it has a good side effect to remove an XXXSMP in kpsignal.

i don't think SIGIO and its fcntl/ioctl are in POSIX.
SIGPOLL is in POSIX, but it's for STREAMS which we don't have.

> 2. I don't know why we get the wrong direction. I think I added the 
> directional
>    notification and I might have gotten it backwards. The comments in the
>    code indicate otherwise. I would expect poll to report backwards too then.
>    Does it?
> 
> Do you know why we have:
> #define POLLIN          0x0001
> #define POLLPRI         0x0002
> #define POLLOUT         0x0004
> #define POLLRDNORM      0x0040
> #define POLLWRNORM      POLLOUT <--- and not a separate flag?

no idea.

> #define POLLRDBAND      0x0080
> #define POLLWRBAND      0x0100
> 
> | > | - siginfo.h and siginfo(2) mention SIGPOLL which actually does not 
> exist.
> | > |   should they be just removed?
> | > 
> | > I think we should alias SIGPOLL to SIGIO since it is a mentioned extension
> | > to POSIX.
> | 
> | isn't SIGPOLL something for STREAMS?
> | are they supposed to be same?
> 
> It used to be, but now it is:
> 
> http://en.wikipedia.org/wiki/SIGPOLL

which part of the page are you reffering to?
"On Linux, SIGIO is a synonym for SIGPOLL." ?

> so I think we should just #define SIGPOLL SIGIO
> 
> | 
> | thanks.
> | i think it's better to unifdef pipeselwakeup then.
> 
> go for it!

i will.

YAMAMOTO Takashi

> 
> christos


Home | Main Index | Thread Index | Old Index