*
*/
-#include "config.h"
+#include "squid.h"
#if USE_EPOLL
-#include "squid.h"
#include "comm/Loops.h"
#include "fde.h"
+#include "globals.h"
#include "mgr/Registration.h"
+#include "profiler/Profiler.h"
#include "SquidTime.h"
#include "StatCounters.h"
#include "StatHist.h"
#if HAVE_SYS_EPOLL_H
#include <sys/epoll.h>
#endif
+#if HAVE_ERRNO_H
+#include <errno.h>
+#endif
static int kdpfd;
static int max_poll_time = 1000;
static void commEPollRegisterWithCacheManager(void);
-
/* XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX */
/* Public functions */
-
/*
* This is a needed exported function which will be called to initialise
* the network loop code.
SetSelect(fd, 0, NULL, NULL, 0);
}
-
static void commIncomingStats(StoreEntry * sentry);
static void
for (;;) {
num = epoll_wait(kdpfd, pevents, SQUID_MAXFD, msec);
- ++statCounter.select_loops;
+ ++ statCounter.select_loops;
if (num >= 0)
break;
PROF_start(comm_handle_ready_fd);
- for (i = 0, cevents = pevents; i < num; i++, cevents++) {
+ for (i = 0, cevents = pevents; i < num; ++i, ++cevents) {
fd = cevents->data.fd;
F = &fd_table[fd];
debugs(5, DEBUG_EPOLL ? 0 : 8, HERE << "got FD " << fd << " events=" <<
F->read_handler = NULL;
hdl(fd, F->read_data);
PROF_stop(comm_write_handler);
- statCounter.select_fds++;
+ ++ statCounter.select_fds;
} else {
debugs(5, DEBUG_EPOLL ? 0 : 8, HERE << "no read handler for FD " << fd);
// remove interest since no handler exist for this event.
F->write_handler = NULL;
hdl(fd, F->write_data);
PROF_stop(comm_read_handler);
- statCounter.select_fds++;
+ ++ statCounter.select_fds;
} else {
debugs(5, DEBUG_EPOLL ? 0 : 8, HERE << "no write handler for FD " << fd);
// remove interest since no handler exist for this event.