Permalink
Browse files

TS-981 Remove the support for libev (for now at least).

  • Loading branch information...
1 parent 965c3e6 commit dfdb6780dbb0771e230a079780066b6ba8edbc1d @zwoop zwoop committed Mar 30, 2012
View
@@ -1,5 +1,7 @@
-*- coding: utf-8 -*-
Changes with Apache Traffic Server 3.1.4
+ *) [TS-981] Remove the support for libev (for now at least).
+
*) [TS-1172] Remove remap/StringHash.{cc,h}, they are not used.
*) [TS-1171] http_ui cache lookup, double free.
View
@@ -36,7 +36,7 @@ DIST_BUILD_USER=`id -nu`
DIST_BUILD_USER_GROUP=`id -ng`
DISTCHECK_CONFIGURE_FLAGS=--with-user=${DIST_BUILD_USER} --with-group=${DIST_BUILD_USER_GROUP}
-EXTRA_DIST=CHANGES INSTALL STATUS NOTICE LAYOUT LICENSE example contrib README.libev README-EC2 REVIEWERS
+EXTRA_DIST=CHANGES INSTALL STATUS NOTICE LAYOUT LICENSE example contrib README-EC2 REVIEWERS
installcheck-local:
$(DESTDIR)$(bindir)/traffic_server -R 1
View
1 README
@@ -25,7 +25,6 @@ plugins to build large scale web applications.
|-- emacs-style ........ emacs style definition
|-- README ............. intro, links, build info
|-- README-EC2 ......... info on EC2 support
- |-- README.libev ....... instructions to build with 'libev'
|-- REVIEWERS .......... (incomplete) list of areas with committer interest
|-- LICENSE ............ full license text
|-- NOTICE ............. copyright notices
View
@@ -1,73 +0,0 @@
-To compile TrafficServer with libev
-
-1. Get the libev source by either:
- a. Pull the libev source into the root of the TS source
- cvs -z3 -d :pserver:anonymous@cvs.schmorp.de/schmorpforge co libev
-
- OR
-
- b. Download libev tar ball e.g. libev-3.8.tar.gz and extract into
- toplevel TS source directory. Next symlink the extracted directory
- to 'libev' e.g. 'ln -s libev-3.8 libev'.
-
-2. Apply the patch at the end of this file (after CUT HERE) to the libev source
-
-3. In the libev directory
- a. autoreconf -i
- b. ./configure CFLAGS="$CFLAGS -Dinline_size= -DEV_MINPRI=0 -DEV_MAXPRI=0"
- c. install normally
-
-4. Configure trafffic server with '--enable-libev'.
-
-
------------------------- CUT HERE ----------------
-Index: ev.c
-===================================================================
-RCS file: /schmorpforge/libev/ev.c,v
-retrieving revision 1.320
-diff -u -r1.320 ev.c
---- ev.c 4 Dec 2009 20:25:06 -0000 1.320
-+++ ev.c 25 Feb 2010 17:24:18 -0000
-@@ -467,7 +467,9 @@
-
- #define expect_false(expr) expect ((expr) != 0, 0)
- #define expect_true(expr) expect ((expr) != 0, 1)
-+#ifndef inline_size
- #define inline_size static inline
-+#endif
-
- #if EV_MINIMAL
- # define inline_speed static noinline
-Index: ev_poll.c
-===================================================================
-RCS file: /schmorpforge/libev/ev_poll.c,v
-retrieving revision 1.31
-diff -u -r1.31 ev_poll.c
---- ev_poll.c 19 Jul 2009 04:11:27 -0000 1.31
-+++ ev_poll.c 25 Feb 2010 17:24:18 -0000
-@@ -104,12 +104,12 @@
- else if (errno != EINTR)
- ev_syserr ("(libev) poll");
- }
-- else
-- for (p = polls; res; ++p)
-+ else {
-+ int i = 0;
-+ for (i = 0; i < pollcnt; i++) {
-+ p = &polls[i];
- if (expect_false (p->revents)) /* this expect is debatable */
- {
-- --res;
--
- if (expect_false (p->revents & POLLNVAL))
- fd_kill (EV_A_ p->fd);
- else
-@@ -120,6 +120,8 @@
- | (p->revents & (POLLIN | POLLERR | POLLHUP) ? EV_READ : 0)
- );
- }
-+ }
-+ }
- }
-
- int inline_size
View
@@ -79,7 +79,6 @@ lib/ts/ink_res_mkquery.cc
lib/ts/ink_rand.h
lib/ts/ink_rand.cc
lib/tsconfig/BisonHeaderToC++.sed
-README.libev
README-EC2
REVIEWERS
contrib/perl/AdminClient/Changes
View
@@ -199,18 +199,6 @@ AC_SUBST(has_tests)
AM_CONDITIONAL([BUILD_TESTS], [test 0 -ne $has_tests])
#
-# libev
-#
-
-AC_MSG_CHECKING([whether to use libev even if not required])
-AC_ARG_ENABLE([libev],
- [AS_HELP_STRING([--enable-libev],[use libev even if not required])],
- [],
- [enable_libev=no]
-)
-AC_MSG_RESULT([$enable_libev])
-
-#
# Micro
#
AC_MSG_CHECKING([whether to enable micro-TS])
@@ -830,12 +818,6 @@ AC_CHECK_LIB([rt],[clock_gettime],[AC_SUBST([LIBRT],["-lrt"])])
AC_CHECK_LIB([posix4],[clock_gettime],[AC_SUBST([LIBRT],["-lposix4"])])
AC_CHECK_LIB([iconv],[iconv_open],[AC_SUBST([LIBICONV],["-liconv"])])
AC_CHECK_LIB([iconv],[libiconv_open],[AC_SUBST([LIBICONV],["-liconv"])])
-# TODO: We have --enable-libev but here we add it unconditionally
-# making resulting binaries always linked to libev if present.
-# Use a proper --with-libev and fail on --enable-libev and -lev
-# is missing. Allow --with-libev=builtin? living in ./srclib/ev ?
-#
-AC_CHECK_LIB([ev],[ev_sleep],[AC_SUBST([LIBEV],["-lev"])])
#
# Check for SSL presence and usability
@@ -941,14 +923,10 @@ fi
AC_SUBST(execinfoh)
AC_SUBST(has_backtrace)
-use_libev=0
use_epoll=0
use_kqueue=0
use_port=0
-if test "x$enable_libev" = "xyes"; then
- use_libev=1
- have_good_poller=1
-elif test "$ac_cv_func_epoll_ctl" = "yes"; then
+if test "$ac_cv_func_epoll_ctl" = "yes"; then
use_epoll=1
have_good_poller=1
AC_MSG_NOTICE([Using epoll event interface])
@@ -963,7 +941,6 @@ elif test "$ac_cv_func_port_create" = "yes"; then
else
AC_MSG_FAILURE([No suitable polling interface found])
fi
-AC_SUBST(use_libev)
AC_SUBST(use_epoll)
AC_SUBST(use_kqueue)
AC_SUBST(use_port)
@@ -1329,10 +1306,6 @@ iocore_include_dirs="-I\$(top_srcdir)/iocore/eventsystem \
-I\$(top_srcdir)/iocore/utils \
-I\$(top_srcdir)/iocore/dns"
-if test "x$enable_libev" = "xyes"; then
- iocore_include_dirs="${iocore_include_dirs} -I\$(top_srcdir)/libev"
-fi
-
# Testing Framework suffix generation hack
TFW_PACKAGE_SUFFIX=$os_type
@@ -43,7 +43,7 @@ tsapp_LDADD = \
@LIBTHREAD@ @LIBSOCKET@ @LIBNSL@ @LIBRESOLV@ @LIBRT@ \
@LIBPCRE@ @LIBSSL@ @LIBTCL@ @LIBDL@ \
@LIBEXPAT@ @LIBDEMANGLE@ @LIBICONV@ \
- @LIBMLD@ @LIBEXC@ -lm @LIBEV@ @LIBPROFILER@ @LIBEXECINFO@
+ @LIBMLD@ @LIBEXC@ -lm @LIBPROFILER@ @LIBEXECINFO@
EXTRA_DIST = records.config.in
sysconfdir = $(pkgsysconfdir)
View
@@ -119,12 +119,6 @@ do { \
NET_SYSTEM_MODULE_MAJOR_VERSION, \
NET_SYSTEM_MODULE_MINOR_VERSION, \
PRIVATE_MODULE_HEADER)
-// libev backend flags
-#if defined(solaris)
-#define LIBEV_BACKEND_LIST (EVBACKEND_POLL | EVBACKEND_SELECT) // Level-Triggered
-#else
- #define LIBEV_BACKEND_LIST 0 /* auto */
-#endif
// For very verbose iocore debugging.
#ifndef DEBUG
View
@@ -37,12 +37,6 @@
#define EVENTIO_UDP_CONNECTION 4
#define EVENTIO_ASYNC_SIGNAL 5
-#if TS_USE_LIBEV
-#define EVENTIO_READ EV_READ
-#define EVENTIO_WRITE EV_WRITE
-#define EVENTIO_ERROR EV_ERROR
-#endif
-
#if TS_USE_EPOLL
#ifdef USE_EDGE_TRIGGER_EPOLL
#define USE_EDGE_TRIGGER 1
@@ -75,31 +69,6 @@
#define EVENTIO_ERROR (POLLERR|POLLPRI|POLLHUP)
#endif
-#if TS_USE_LIBEV
-#define EV_MINPRI 0
-#define EV_MAXPRI 0
-#include "ev.h"
-typedef void (*eio_cb_t)(struct ev_loop*, struct ev_io*, int);
-// expose libev internals
-#define NUMPRI (EV_MAXPRI - EV_MINPRI + 1)
-typedef void ANFD;
-typedef struct {
- ev_watcher *w;
- int events;
-} ANPENDING;
-typedef void ANHE;
-typedef ev_watcher *W;
-struct ev_loop
-{
- ev_tstamp ev_rt_now;
-#define ev_rt_now ((loop)->ev_rt_now)
-#define VAR(name,decl) decl;
-#include "ev_vars.h"
-#undef VAR
-};
-extern "C" void fd_change(struct ev_loop *, int fd, int flags);
-#endif /* USE_LIBEV */
-
struct PollDescriptor;
typedef PollDescriptor *EventLoop;
@@ -109,13 +78,7 @@ struct DNSConnection;
struct NetAccept;
struct EventIO
{
-#if TS_USE_LIBEV
- ev_io eio;
-#define evio_get_port(e) ((e)->eio.fd)
-#else
int fd;
-#define evio_get_port(e) ((e)->fd)
-#endif
#if TS_USE_KQUEUE || TS_USE_EPOLL && !defined(USE_EDGE_TRIGGER) || TS_USE_PORT
int events;
#endif
@@ -142,9 +105,6 @@ struct EventIO
int stop();
int close();
EventIO() {
-#if !TS_USE_LIBEV
- fd = 0;
-#endif
type = 0;
data.c = 0;
}
@@ -498,45 +458,6 @@ TS_INLINE int EventIO::close() {
return -1;
}
-#if TS_USE_LIBEV
-
-TS_INLINE int EventIO::start(EventLoop l, int afd, Continuation *c, int e) {
- event_loop = l;
- data.c = c;
- ev_init(&eio, (eio_cb_t)this);
- ev_io_set(&eio, afd, e);
- ev_io_start(l->eio, &eio);
- return 0;
-}
-
-TS_INLINE int EventIO::modify(int e) {
- ink_assert(event_loop);
- int ee = eio.events;
- if (e < 0)
- ee &= ~(-e);
- else
- ee |= e;
- if (ee != eio.events) {
- eio.events = ee;
- fd_change(event_loop->eio, eio.fd, 0);
- }
- return 0;
-}
-
-TS_INLINE int EventIO::refresh(int e) {
- return 0;
-}
-
-TS_INLINE int EventIO::stop() {
- if (event_loop) {
- ev_io_stop(event_loop->eio, &eio);
- event_loop = 0;
- }
- return 0;
-}
-
-#else /* !TS_USE_LIBEV */
-
TS_INLINE int EventIO::start(EventLoop l, int afd, Continuation *c, int e) {
data.c = c;
fd = afd;
@@ -701,6 +622,4 @@ TS_INLINE int EventIO::stop() {
return 0;
}
-#endif /* !TS_USE_LIBEV */
-
#endif
@@ -32,9 +32,6 @@
#include "libts.h"
-#if TS_USE_LIBEV
-#include "ev.h"
-#endif
#if TS_USE_KQUEUE
#include <sys/event.h>
#define INK_EVP_IN 0x001
@@ -51,9 +48,6 @@ typedef struct pollfd Pollfd;
struct PollDescriptor
{
int result; // result of poll
-#if TS_USE_LIBEV
- struct ev_loop *eio;
-#endif
#if TS_USE_EPOLL
int epoll_fd;
int nfds; // actual number
@@ -67,16 +61,6 @@ struct PollDescriptor
int port_fd;
#endif
-#if TS_USE_LIBEV
-#define get_ev_port(a) ((a)->eio->backend_fd)
-#define get_ev_events(a,x) (a->eio->pendings[0] + a->eio->pendingcnt[0] - 1)->events
-#define get_ev_data(a,x) ((EventIO*)(a->eio->pendings[0] + a->eio->pendingcnt[0] - 1)->w->cb)
-#define ev_next_event(a,x) do { \
- (a->eio->pendings[0] + a->eio->pendingcnt[0] - 1)->w->pending = 0; \
- a->eio->pendingcnt[0]--; \
- } while (0)
-#endif
-
#if TS_USE_EPOLL
#define get_ev_port(a) ((a)->epoll_fd)
#define get_ev_events(a,x) ((a)->ePoll_Triggered_Events[(x)].events)
@@ -130,10 +114,6 @@ struct PollDescriptor
PollDescriptor *init()
{
result = 0;
-#if TS_USE_LIBEV
- eio = 0;
- // eio = ev_loop_new(0); moved to initialize_thread_for_xx --- all this junk should go away
-#endif
#if TS_USE_EPOLL
nfds = 0;
epoll_fd = epoll_create(POLL_DESCRIPTOR_SIZE);
Oops, something went wrong.

0 comments on commit dfdb678

Please sign in to comment.