tech-kern archive

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

poll(): IN/OUT vs {RD,WR}NORM



In sys/sys/poll.h, I see (in 1.4T, -current according to cvsweb, and
everything I've checked in between):

#define POLLIN          0x0001
#define POLLPRI         0x0002
#define POLLOUT         0x0004
#define POLLRDNORM      0x0040
#define POLLWRNORM      POLLOUT
#define POLLRDBAND      0x0080
#define POLLWRBAND      0x0100

I can understand treating POLLWRNORM as identical to POLLOUT.  But why
the distinction between POLLRDNORM and POLLIN?  Might anyone know the
reason and be willing to explain?

Not that it matters tremendously.  But I'm curious, because it
indicates there's something I don't understand somewhere there.  The
wording is a bit confusing.  In -current's poll(2), POLLIN is said to
be synonymous with POLLRDNORM (and POLLOUT with POLLWRNORM); in 1.4T
and 5.2, there is confusing wording about "high priority data" and
"data with a non-zero priority", which may or may not be talking about
the same thing and may or may not map onto other concepts such as TCP's
push semantics, and the wording is different in the two directions.
-current's manpage's BUGS entry implies, to me, that this distinction
is something of a historical accident that should be fixed, but, even
if that reading is correct, I'd still be curious where it came from.

/~\ The ASCII				  Mouse
\ / Ribbon Campaign
 X  Against HTML		mouse%rodents-montreal.org@localhost
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B


Home | Main Index | Thread Index | Old Index