~ubuntu-branches/ubuntu/wily/trafficserver/wily

« back to all changes in this revision

Viewing changes to README.libev

  • Committer: Package Import Robot
  • Author(s): Adam Conrad
  • Date: 2012-12-17 22:28:16 UTC
  • mfrom: (5.1.8 raring-proposed)
  • Revision ID: package-import@ubuntu.com-20121217222816-7xwjsx5k76zkb63d
Tags: 3.2.0-1ubuntu1
* Revert FreeBSD strerror_r() fixes that give errors with glibc 2.16.
* Apply patch from Konstantinos Margaritis to define barriers on ARM.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
To compile TrafficServer with libev
2
 
 
3
 
1. Get the libev source by either:
4
 
   a. Pull the libev source into the root of the TS source
5
 
      cvs -z3 -d :pserver:anonymous@cvs.schmorp.de/schmorpforge co libev
6
 
 
7
 
 OR
8
 
 
9
 
   b. Download libev tar ball e.g. libev-3.8.tar.gz  and extract into 
10
 
      toplevel TS source directory. Next symlink the extracted directory 
11
 
      to 'libev' e.g. 'ln -s libev-3.8 libev'.
12
 
 
13
 
2. Apply the patch at the end of this file (after CUT HERE) to the libev source
14
 
 
15
 
3. In the libev directory
16
 
  a. autoreconf -i
17
 
  b. ./configure CFLAGS="$CFLAGS -Dinline_size= -DEV_MINPRI=0 -DEV_MAXPRI=0"
18
 
  c. install normally
19
 
 
20
 
4. Configure trafffic server with '--enable-libev'.
21
 
 
22
 
 
23
 
------------------------ CUT HERE ----------------
24
 
Index: ev.c
25
 
===================================================================
26
 
RCS file: /schmorpforge/libev/ev.c,v
27
 
retrieving revision 1.320
28
 
diff -u -r1.320 ev.c
29
 
--- ev.c        4 Dec 2009 20:25:06 -0000       1.320
30
 
+++ ev.c        25 Feb 2010 17:24:18 -0000
31
 
@@ -467,7 +467,9 @@
32
 
 
33
 
 #define expect_false(expr) expect ((expr) != 0, 0)
34
 
 #define expect_true(expr)  expect ((expr) != 0, 1)
35
 
+#ifndef inline_size
36
 
 #define inline_size        static inline
37
 
+#endif
38
 
 
39
 
 #if EV_MINIMAL
40
 
 # define inline_speed      static noinline
41
 
Index: ev_poll.c
42
 
===================================================================
43
 
RCS file: /schmorpforge/libev/ev_poll.c,v
44
 
retrieving revision 1.31
45
 
diff -u -r1.31 ev_poll.c
46
 
--- ev_poll.c   19 Jul 2009 04:11:27 -0000      1.31
47
 
+++ ev_poll.c   25 Feb 2010 17:24:18 -0000
48
 
@@ -104,12 +104,12 @@
49
 
       else if (errno != EINTR)
50
 
         ev_syserr ("(libev) poll");
51
 
     }
52
 
-  else
53
 
-    for (p = polls; res; ++p)
54
 
+  else {
55
 
+    int i = 0;
56
 
+    for (i = 0; i < pollcnt; i++) {
57
 
+      p = &polls[i];
58
 
       if (expect_false (p->revents)) /* this expect is debatable */
59
 
         {
60
 
-          --res;
61
 
-
62
 
           if (expect_false (p->revents & POLLNVAL))
63
 
             fd_kill (EV_A_ p->fd);
64
 
           else
65
 
@@ -120,6 +120,8 @@
66
 
               | (p->revents & (POLLIN | POLLERR | POLLHUP) ? EV_READ : 0)
67
 
             );
68
 
         }
69
 
+      }
70
 
+  }
71
 
 }
72
 
 
73
 
 int inline_size