Версия для печати темы
Нажмите сюда для просмотра этой темы в оригинальном формате
Форум программистов > C/C++: Программирование под Unix/Linux > poll function


Автор: sergioK1 30.7.2018, 14:04
В poll.h  есть флаги 

Код

#define POLLIN        0x001        /* There is data to read.  */
#define POLLPRI        0x002        /* There is urgent data to read.  */
#define POLLOUT        0x004        /* Writing now will not block.  */

#if defined __USE_XOPEN || defined __USE_XOPEN2K8
/* These values are defined in XPG4.2.  */
# define POLLRDNORM    0x040        /* Normal data may be read.  */
# define POLLRDBAND    0x080        /* Priority data may be read.  */
# define POLLWRNORM    0x100        /* Writing now will not block.  */
# define POLLWRBAND    0x200        /* Priority data may be written.  */
#endif

#ifdef __USE_GNU
/* These are extensions for Linux.  */
# define POLLMSG    0x400
# define POLLREMOVE    0x1000
# define POLLRDHUP    0x2000
#endif

/* Event types always implicitly polled for.  These bits need not be set in
   `events', but they will appear in `revents' to indicate the status of
   the file descriptor.  */
#define POLLERR        0x008        /* Error condition.  */
#define POLLHUP        0x010        /* Hung up.  */
#define POLLNVAL    0x020        /* Invalid polling request.  */




POLLIN понятно , а что значит POLLRDNORM  , POLLPRI? POLLRDBAND? 
что значит urgent data ? Priority data ? , как это грамотно применять ?

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)