Lines Matching refs:maxfdp1

39 static int check_fds(int maxfdp1, fd_set *readfds, fd_set *writefds,
42 static void debug_print_fdsets(int maxfdp1, fd_set *readfds, fd_set *writefds,
47 static int pack_on_waitset(int maxfdp1, fd_set *readfds, fd_set *writefds,
49 struct waitset *ws_store[][maxfdp1],
54 static int update_waitset(int maxfdp1, fd_set *readfds, fd_set *writefds,
56 struct waitset *ws_store[][maxfdp1],
76 int select(int maxfdp1, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
83 debug_print_fdsets(maxfdp1, readfds, writefds, exceptfds);
107 * FD_ISSET(changed_read_ws, maxfdp1) indicates whether or not we changed the
119 struct waitset *ws_store[2][maxfdp1];
121 /* check validity of maxfdp1 */
122 if (maxfdp1 < MIN_FD || maxfdp1 > MAX_FD || maxfdp1 > FD_SETSIZE) {
155 retfds = check_fds(maxfdp1, readfds, writefds, exceptfds);
184 ret = pack_on_waitset(maxfdp1, readfds, writefds, exceptfds, changed_ws,
200 retfds = check_fds(maxfdp1, readfds, writefds, exceptfds);
208 ret = update_waitset(maxfdp1, readfds, writefds, exceptfds,
229 if (FD_ISSET(maxfdp1, changed_ws[READ_SLOT])) {
231 err = mb->change_waitset(mb, ws_store[READ_SLOT][maxfdp1]);
238 for (int fd = 0; fd < maxfdp1; fd++) {
303 for (int fd = 0; fd < maxfdp1; fd++) {
375 debug_print_fdsets(maxfdp1, readfds, writefds, exceptfds);
385 * \param maxfdp1 Maximum file descriptor in all sets + 1.
400 static int check_fds(int maxfdp1, fd_set *readfds, fd_set *writefds,
411 for (int fd = 0; fd < maxfdp1; fd++) {
490 for (int fd = 0; fd < maxfdp1; fd++) {
580 * \param maxfdp1 Maximum file descriptor in all sets +1.
592 static int pack_on_waitset(int maxfdp1, fd_set *readfds, fd_set *writefds,
594 struct waitset *ws_store[][maxfdp1],
606 for (int fd = 0; fd < maxfdp1; fd++) {
651 FD_SET(maxfdp1, changed_ws[READ_SLOT]);
678 FD_SET(maxfdp1, changed_ws[READ_SLOT]);
695 FD_SET(maxfdp1, changed_ws[READ_SLOT]);
715 for (int fd = 0; fd < maxfdp1; fd++) {
747 FD_SET(maxfdp1, changed_ws[READ_SLOT]);
782 FD_SET(maxfdp1, changed_ws[READ_SLOT]);
799 FD_SET(maxfdp1, changed_ws[READ_SLOT]);
818 if (FD_ISSET(maxfdp1, changed_ws[READ_SLOT])) {
820 ws_store[READ_SLOT][maxfdp1] = monitor_ws;
852 * \param maxfdp1 Maximum file descriptor in all sets +1.
864 static int update_waitset(int maxfdp1, fd_set *readfds, fd_set *writefds,
866 struct waitset *ws_store[][maxfdp1],
873 for (int fd = 0; fd < maxfdp1; fd++) {
931 for (int fd = 0; fd < maxfdp1; fd++) {
1011 static void debug_fdset_to_string(char *str, size_t size, int maxfdp1,
1029 for (int fd = 0; fd < maxfdp1; fd++) {
1077 static inline void debug_fdset_to_string(char *str, size_t size, int maxfdp1,
1085 static void debug_print_fdsets(int maxfdp1, fd_set *readfds, fd_set *writefds,
1091 debug_fdset_to_string(rbuffer, PRINT_BUFSZ, maxfdp1, readfds);
1092 debug_fdset_to_string(wbuffer, PRINT_BUFSZ, maxfdp1, writefds);
1093 debug_fdset_to_string(ebuffer, PRINT_BUFSZ, maxfdp1, exceptfds);
1098 static inline void debug_print_fdsets(int maxfdp1, fd_set *readfds,