Select Git revision
pike_memory.c
backend.h 8.17 KiB
/*
|| This file is part of Pike. For copyright information see COPYRIGHT.
|| Pike is distributed under GPL, LGPL and MPL. See the file COPYING
|| for more information.
*/
#ifndef BACKEND_H
#define BACKEND_H
#include "global.h"
#include "time_stuff.h"
#include "callback.h"
/*
* POLL/SELECT selection
*/
#if defined(HAVE_SYS_DEVPOLL_H) && defined(PIKE_POLL_DEVICE)
/*
* Backend using /dev/poll-style poll device.
*
* Used on:
* Solaris 7 + patches and above.
* OSF/1 + patches and above.
* IRIX 5.6.15m and above.
*/
#define BACKEND_USES_POLL_DEVICE
#define BACKEND_USES_DEVPOLL
#elif defined(HAVE_SYS_EPOLL_H) && defined(WITH_EPOLL)
/*
* Backend using /dev/epoll-style poll device.
*
* Used on:
* Linux 2.6 and above.
*/
#define BACKEND_USES_POLL_DEVICE
#define BACKEND_USES_DEVEPOLL
#elif defined(HAVE_SYS_EVENT_H) && defined(HAVE_KQUEUE) /* && !HAVE_POLL */
/*
* Backend using kqueue-style poll device.
*
* FIXME: Not fully implemented yet! Out of band data handling is missing.
*
* Used on
* FreeBSD 4.1 and above.
* MacOS X/Darwin 7.x and above.
* Various other BSDs.
*/
#define BACKEND_USES_KQUEUE
/* Currently kqueue doesn't differentiate between in-band and out-of-band
* data.
*/
#define BACKEND_OOB_IS_SIMULATED
#if defined(HAVE_CFRUNLOOPRUNINMODE)
/* Have kqueue+CFRunLoop variant (Mac OSX, iOS) */
#define BACKEND_USES_CFRUNLOOP
#endif /* HAVE_CFRUNLOOPRUNINMODE */
#elif defined(HAVE_POLL) && defined(HAVE_AND_USE_POLL)
/* We have poll(2), and it isn't simulated. */
/*
* Backend using poll(2).
*
* This is used on most older SVR4- or POSIX-style systems.
*/
#define BACKEND_USES_POLL
#else /* !HAVE_POLL */
/*
* Backend using select(2)