Repository: trafficserver Updated Branches: refs/heads/master 395036391 -> f6b7e79fb
Remove unused iov_memcpy Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/f6b7e79f Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/f6b7e79f Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/f6b7e79f Branch: refs/heads/master Commit: f6b7e79fbda564476d85150cc7c50e0412afcb92 Parents: 3950363 Author: James Peach <jpe...@apache.org> Authored: Sat Jun 28 09:37:50 2014 -0700 Committer: James Peach <jpe...@apache.org> Committed: Sat Jun 28 09:37:50 2014 -0700 ---------------------------------------------------------------------- iocore/cluster/ClusterLib.cc | 21 --------------------- iocore/cluster/P_ClusterInternal.h | 3 --- iocore/cluster/P_ClusterLib.h | 1 - iocore/net/UnixNetVConnection.cc | 1 - lib/ts/ink_memory.h | 2 ++ 5 files changed, 2 insertions(+), 26 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f6b7e79f/iocore/cluster/ClusterLib.cc ---------------------------------------------------------------------- diff --git a/iocore/cluster/ClusterLib.cc b/iocore/cluster/ClusterLib.cc index 1d81382..6ff5c27 100644 --- a/iocore/cluster/ClusterLib.cc +++ b/iocore/cluster/ClusterLib.cc @@ -64,27 +64,6 @@ cluster_reschedule_offset(ClusterHandler * ch, ClusterVConnection * vc, ClusterV ClusterVC_enqueue_write(ch->write_vcs[(ch->cur_vcs + offset) % CLUSTER_BUCKETS], vc); } } - -// -// iov_memcpy() -- struct iov based memcpy() -// -int -iov_memcpy(IOVec * iov, int n_iov, int did, char *bb_arg) -{ - char *bb = bb_arg; - for (int i = 0; i < n_iov; i++) { - int len = iov[i].iov_len; - did -= len; - if (did < 0) { - // fprintf(stderr,"iov_memcpy %X %d\n",iov[i].iov_base+(len+did),-did); - memcpy(bb, (char *) iov[i].iov_base + (len + did), -did); - bb += -did; - did = 0; - } - } - return bb - bb_arg; -} - /*************************************************************************/ // ClusterVCToken member functions (Public Class) /*************************************************************************/ http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f6b7e79f/iocore/cluster/P_ClusterInternal.h ---------------------------------------------------------------------- diff --git a/iocore/cluster/P_ClusterInternal.h b/iocore/cluster/P_ClusterInternal.h index 679461d..eaa18e3 100644 --- a/iocore/cluster/P_ClusterInternal.h +++ b/iocore/cluster/P_ClusterInternal.h @@ -484,8 +484,6 @@ typedef int (OutgoingControl::*OutgoingCtrlHandler) (int, void *); struct ClusterVConnection; typedef int (ClusterVConnection::*ClusterVConnHandler) (int, void *); -typedef struct iovec IOVec; - // Library declarations extern void cluster_set_priority(ClusterHandler *, ClusterVConnState *, int); extern void cluster_lower_priority(ClusterHandler *, ClusterVConnState *); @@ -497,7 +495,6 @@ extern void cluster_disable(ClusterHandler *, ClusterVConnection *, ClusterVConn extern void cluster_update_priority(ClusterHandler *, ClusterVConnection *, ClusterVConnState *, int64_t, int64_t); #define CLUSTER_BUMP_NO_REMOVE -1 extern void cluster_bump(ClusterHandler *, ClusterVConnectionBase *, ClusterVConnState *, int); -extern int iov_memcpy(IOVec *, int, int, char *); extern IOBufferBlock *clone_IOBufferBlockList(IOBufferBlock *, int, int, IOBufferBlock **); extern IOBufferBlock *consume_IOBufferBlockList(IOBufferBlock *, int64_t); http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f6b7e79f/iocore/cluster/P_ClusterLib.h ---------------------------------------------------------------------- diff --git a/iocore/cluster/P_ClusterLib.h b/iocore/cluster/P_ClusterLib.h index 9aaceeb..eff5098 100644 --- a/iocore/cluster/P_ClusterLib.h +++ b/iocore/cluster/P_ClusterLib.h @@ -41,7 +41,6 @@ extern void cluster_reschedule(ClusterHandler *, ClusterVConnection *, ClusterVC extern void cluster_disable(ClusterHandler *, ClusterVConnection *, ClusterVConnState *); extern void cluster_update_priority(ClusterHandler *, ClusterVConnection *, ClusterVConnState *, int64_t, int64_t); extern void cluster_bump(ClusterHandler *, ClusterVConnectionBase *, ClusterVConnState *, int); -extern int iov_memcpy(IOVec *, int, int, char *); #if TEST_PARTIAL_READS extern int partial_readv(int, IOVec *, int, int); http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f6b7e79f/iocore/net/UnixNetVConnection.cc ---------------------------------------------------------------------- diff --git a/iocore/net/UnixNetVConnection.cc b/iocore/net/UnixNetVConnection.cc index 47406ac..cf1d9c8 100644 --- a/iocore/net/UnixNetVConnection.cc +++ b/iocore/net/UnixNetVConnection.cc @@ -31,7 +31,6 @@ #define enable_read(_vc) (_vc)->read.enabled = 1 #define enable_write(_vc) (_vc)->write.enabled = 1 -typedef struct iovec IOVec; #ifndef UIO_MAXIOV #define NET_MAX_IOV 16 // UIO_MAXIOV shall be at least 16 1003.1g (5.4.1.1) #else http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f6b7e79f/lib/ts/ink_memory.h ---------------------------------------------------------------------- diff --git a/lib/ts/ink_memory.h b/lib/ts/ink_memory.h index 69ac56f..5b7601a 100644 --- a/lib/ts/ink_memory.h +++ b/lib/ts/ink_memory.h @@ -76,6 +76,8 @@ extern "C" { #endif /* __cplusplus */ + typedef struct iovec IOVec; + void * ats_malloc(size_t size); void * ats_calloc(size_t nelem, size_t elsize); void * ats_realloc(void *ptr, size_t size);