+++ /dev/null
-/*
- include/proto/polling.h
- Polling functions.
-
- Copyright (C) 2000-2006 Willy Tarreau - w@1wt.eu
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation, version 2.1
- exclusively.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-*/
-
-#ifndef _PROTO_POLLING_H
-#define _PROTO_POLLING_H
-
-#include <common/config.h>
-#include <types/polling.h>
-
-/*
- * Main select() loop.
- * does 3 actions :
- * 0 (POLL_LOOP_ACTION_INIT) : initializes necessary private structures
- * 1 (POLL_LOOP_ACTION_RUN) : runs the loop
- * 2 (POLL_LOOP_ACTION_CLEAN) : cleans up
- *
- * returns 0 if initialization failed, !0 otherwise.
- */
-int select_loop(int action);
-
-#if defined(ENABLE_POLL)
-/*
- * Main poll() loop.
- * does 3 actions :
- * 0 (POLL_LOOP_ACTION_INIT) : initializes necessary private structures
- * 1 (POLL_LOOP_ACTION_RUN) : runs the loop
- * 2 (POLL_LOOP_ACTION_CLEAN) : cleans up
- *
- * returns 0 if initialization failed, !0 otherwise.
- */
-int poll_loop(int action);
-#endif
-
-#if defined(ENABLE_EPOLL)
-/*
- * Main epoll() loop.
- * does 3 actions :
- * 0 (POLL_LOOP_ACTION_INIT) : initializes necessary private structures
- * 1 (POLL_LOOP_ACTION_RUN) : runs the loop
- * 2 (POLL_LOOP_ACTION_CLEAN) : cleans up
- *
- * returns 0 if initialization failed, !0 otherwise.
- */
-int epoll_loop(int action);
-#endif
-
-
-#endif /* _PROTO_POLLING_H */
-
-/*
- * Local variables:
- * c-indent-level: 8
- * c-basic-offset: 8
- * End:
- */
#include <common/config.h>
-/* for POLL_* */
-#if defined(ENABLE_POLL)
-#include <sys/poll.h>
-#endif
-
-/* for EPOLL_* */
-#if defined(ENABLE_EPOLL)
-#if !defined(USE_MY_EPOLL)
-#include <sys/epoll.h>
-#else
-#include <common/epoll.h>
-#endif
-#endif
-
-/* possible actions for the *poll() loops */
-#define POLL_LOOP_ACTION_INIT 0
-#define POLL_LOOP_ACTION_RUN 1
-#define POLL_LOOP_ACTION_CLEAN 2
-
/* poll mechanisms available */
#define POLL_USE_SELECT (1<<0)
#define POLL_USE_POLL (1<<1)
#include <types/global.h>
#include <proto/fd.h>
-#include <proto/polling.h>
#include <proto/task.h>
#if defined(USE_MY_EPOLL)
+#include <common/epoll.h>
#include <errno.h>
#include <sys/syscall.h>
_syscall1 (int, epoll_create, int, size);
_syscall4 (int, epoll_ctl, int, epfd, int, op, int, fd, struct epoll_event *, event);
_syscall4 (int, epoll_wait, int, epfd, struct epoll_event *, events, int, maxevents, int, timeout);
+#else
+#include <sys/epoll.h>
#endif
#include <types/capture.h>
#include <types/global.h>
#include <types/httperr.h>
+#include <types/polling.h>
#include <types/proto_http.h>
#include <proto/backend.h>
#include <proto/client.h>
#include <proto/fd.h>
#include <proto/log.h>
-#include <proto/polling.h>
#include <proto/proto_http.h>
#include <proto/proxy.h>
#include <proto/queue.h>