> Date: Mon, 27 May 2024 20:27:28 -0400 (EDT) > From: Mouse <[email protected]> > > 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?
It's been this way since sysvr4, according to the archive at <https://archive.org/details/ATTUNIXSystemVRelease4Version2> (sysvr4.tar.bz2, svr4/uts/i386/sys/poll.h): /* * Testable select events */ #define POLLIN 0x0001 /* fd is readable */ #define POLLPRI 0x0002 /* high priority info at fd */ #define POLLOUT 0x0004 /* fd is writeable (won't block) */ #define POLLRDNORM 0x0040 /* normal data is readable */ #define POLLWRNORM POLLOUT #define POLLRDBAND 0x0080 /* out-of-band data is readable */ #define POLLWRBAND 0x0100 /* out-of-band data is writeable */ sysvr3 didn't have the NORM/BAND ones. Perhaps you'll find more clues by digging through the changes from sysvr3 to sysvr4.
