Repository: trafficserver
Updated Branches:
  refs/heads/master c3facdf6d -> 18ebfbaa5


TS-2289: Removed old unused AIO modes


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/18ebfbaa
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/18ebfbaa
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/18ebfbaa

Branch: refs/heads/master
Commit: 18ebfbaa53bf0af7b99dd400593a8142351ea51d
Parents: c3facdf
Author: Phil Sorber <[email protected]>
Authored: Tue Sep 30 16:24:07 2014 -0600
Committer: Phil Sorber <[email protected]>
Committed: Tue Sep 30 16:24:07 2014 -0600

----------------------------------------------------------------------
 CHANGES            |  2 ++
 iocore/aio/AIO.cc  | 28 ----------------------------
 iocore/aio/I_AIO.h |  6 ++----
 3 files changed, 4 insertions(+), 32 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/18ebfbaa/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 4719eec..af2c24d 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,8 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache Traffic Server 5.2.0
 
+  *) [TS-2289] Removed old unused AIO modes.
+
   *) [TS-3098] Fix the ability to configure keep-alive on post to the origin
 
   *) [TS-3085] Large POSTs over (relatively) slower connections failing

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/18ebfbaa/iocore/aio/AIO.cc
----------------------------------------------------------------------
diff --git a/iocore/aio/AIO.cc b/iocore/aio/AIO.cc
index f24d2fe..4dea143 100644
--- a/iocore/aio/AIO.cc
+++ b/iocore/aio/AIO.cc
@@ -428,21 +428,7 @@ int
 ink_aio_read(AIOCallback *op, int fromAPI)
 {
   op->aiocb.aio_lio_opcode = LIO_READ;
-
-#if (AIO_MODE == AIO_MODE_AIO)
-  ink_assert(this_ethread() == op->thread);
-  op->thread->aio_ops.enqueue(op);
-  if (aio_read(&op->aiocb) < 0) {
-    Warning("failed aio_read: %s\n", strerror(errno));
-    op->thread->aio_ops.remove(op);
-    return -1;
-  }
-#elif (AIO_MODE == AIO_MODE_SYNC)
-  cache_op((AIOCallbackInternal *) op);
-  op->action.continuation->handleEvent(AIO_EVENT_DONE, op);
-#elif (AIO_MODE == AIO_MODE_THREAD)
   aio_queue_req((AIOCallbackInternal *) op, fromAPI);
-#endif
 
   return 1;
 }
@@ -451,21 +437,7 @@ int
 ink_aio_write(AIOCallback *op, int fromAPI)
 {
   op->aiocb.aio_lio_opcode = LIO_WRITE;
-
-#if (AIO_MODE == AIO_MODE_AIO)
-  ink_assert(this_ethread() == op->thread);
-  op->thread->aio_ops.enqueue(op);
-  if (aio_write(&op->aiocb) < 0) {
-    Warning("failed aio_write: %s\n", strerror(errno));
-    op->thread->aio_ops.remove(op);
-    return -1;
-  }
-#elif (AIO_MODE == AIO_MODE_SYNC)
-  cache_op((AIOCallbackInternal *) op);
-  op->action.continuation->handleEvent(AIO_EVENT_DONE, op);
-#elif (AIO_MODE == AIO_MODE_THREAD)
   aio_queue_req((AIOCallbackInternal *) op, fromAPI);
-#endif
 
   return 1;
 }

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/18ebfbaa/iocore/aio/I_AIO.h
----------------------------------------------------------------------
diff --git a/iocore/aio/I_AIO.h b/iocore/aio/I_AIO.h
index bb95df0..2dc864b 100644
--- a/iocore/aio/I_AIO.h
+++ b/iocore/aio/I_AIO.h
@@ -43,10 +43,8 @@
 
 #define AIO_EVENT_DONE           (AIO_EVENT_EVENTS_START+0)
 
-#define AIO_MODE_AIO             0
-#define AIO_MODE_SYNC            1
-#define AIO_MODE_THREAD          2
-#define AIO_MODE_NATIVE          3
+#define AIO_MODE_THREAD          0
+#define AIO_MODE_NATIVE          1
 
 #if TS_USE_LINUX_NATIVE_AIO
 #define AIO_MODE                 AIO_MODE_NATIVE

Reply via email to