blob: e124c08dffc48bd1f48832cc5b8ba8f4bb60df94 [file] [log] [blame]
Willy Tarreaubaaee002006-06-26 02:48:02 +02001/*
2 include/types/polling.h
3 File descriptors and polling definitions.
4
Willy Tarreau4f60f162007-04-08 16:39:58 +02005 Copyright (C) 2000-2007 Willy Tarreau - w@1wt.eu
Willy Tarreaubaaee002006-06-26 02:48:02 +02006
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Lesser General Public
9 License as published by the Free Software Foundation, version 2.1
10 exclusively.
11
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Lesser General Public License for more details.
16
17 You should have received a copy of the GNU Lesser General Public
18 License along with this library; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20*/
21
22#ifndef _TYPES_POLLING_H
23#define _TYPES_POLLING_H
24
25/* for fd_set */
26#include <sys/time.h>
27#include <sys/types.h>
28#include <unistd.h>
29
Willy Tarreau2dd0d472006-06-29 17:53:05 +020030#include <common/config.h>
Willy Tarreaubaaee002006-06-26 02:48:02 +020031
Willy Tarreaubaaee002006-06-26 02:48:02 +020032/* poll mechanisms available */
33#define POLL_USE_SELECT (1<<0)
34#define POLL_USE_POLL (1<<1)
35#define POLL_USE_EPOLL (1<<2)
Willy Tarreau1e63130a2007-04-09 12:03:06 +020036#define POLL_USE_KQUEUE (1<<3)
Willy Tarreaude99e992007-04-16 00:53:59 +020037#define POLL_USE_SEPOLL (1<<4)
Willy Tarreaubaaee002006-06-26 02:48:02 +020038
Willy Tarreaude99e992007-04-16 00:53:59 +020039extern int cfg_polling_mechanism; /* POLL_USE_{SELECT|POLL|EPOLL|KQUEUE|SEPOLL} */
Willy Tarreaubaaee002006-06-26 02:48:02 +020040
41
42#endif /* _TYPES_POLLING_H */
43
44/*
45 * Local variables:
46 * c-indent-level: 8
47 * c-basic-offset: 8
48 * End:
49 */