Merge libck master (0.4.5-5-g1df6df0)

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

Branch: refs/heads/master
Commit: 0da17e968edc9d51d4d509661f2ae38907b4acb2
Parents: f83d6f2
Author: Phil Sorber <[email protected]>
Authored: Fri Jan 30 18:15:59 2015 -0700
Committer: Phil Sorber <[email protected]>
Committed: Fri Jan 30 18:18:23 2015 -0700

----------------------------------------------------------------------
 lib/ck/build/ck.build.in                        |   4 +-
 lib/ck/build/ck.build.ppc64                     |   1 +
 lib/ck/build/ck.build.x86                       |   1 +
 lib/ck/build/ck.build.x86_64                    |   1 +
 lib/ck/configure                                |   4 +-
 lib/ck/doc/CK_COHORT_INIT                       |   6 +-
 lib/ck/doc/CK_COHORT_LOCK                       |   6 +-
 lib/ck/doc/CK_COHORT_PROTOTYPE                  |   2 +-
 lib/ck/doc/CK_COHORT_TRYLOCK                    |  10 +-
 lib/ck/doc/CK_COHORT_TRYLOCK_PROTOTYPE          |   4 +-
 lib/ck/doc/CK_COHORT_UNLOCK                     |   6 +-
 lib/ck/doc/CK_RWCOHORT_INIT                     |   4 +-
 lib/ck/doc/CK_RWCOHORT_INSTANCE                 |   4 +-
 lib/ck/doc/CK_RWCOHORT_PROTOTYPE                |   4 +-
 lib/ck/doc/CK_RWCOHORT_READ_LOCK                |  18 +-
 lib/ck/doc/CK_RWCOHORT_READ_UNLOCK              |  16 +-
 lib/ck/doc/CK_RWCOHORT_WRITE_LOCK               |  18 +-
 lib/ck/doc/CK_RWCOHORT_WRITE_UNLOCK             |  16 +-
 lib/ck/doc/Makefile.in                          |  21 ++
 lib/ck/doc/ck_bitmap_bts                        |  61 +++++
 lib/ck/doc/ck_cohort                            |   6 +-
 lib/ck/doc/ck_elide                             |   4 +-
 lib/ck/doc/ck_epoch_call                        |   2 +-
 lib/ck/doc/ck_epoch_init                        |   2 +-
 lib/ck/doc/ck_hs_apply                          |  86 ++++++
 lib/ck/doc/ck_hs_fas                            |   4 +-
 lib/ck/doc/ck_hs_move                           |   2 +-
 lib/ck/doc/ck_hs_next                           |   2 +-
 lib/ck/doc/ck_hs_set                            |   2 +-
 lib/ck/doc/ck_pr                                |   4 +-
 lib/ck/doc/ck_pr_add                            |   4 +-
 lib/ck/doc/ck_pr_and                            |   6 +-
 lib/ck/doc/ck_pr_barrier                        |   4 +-
 lib/ck/doc/ck_pr_btc                            |   6 +-
 lib/ck/doc/ck_pr_btr                            |   6 +-
 lib/ck/doc/ck_pr_bts                            |   6 +-
 lib/ck/doc/ck_pr_cas                            |   6 +-
 lib/ck/doc/ck_pr_dec                            |   4 +-
 lib/ck/doc/ck_pr_faa                            |   4 +-
 lib/ck/doc/ck_pr_fas                            |   4 +-
 lib/ck/doc/ck_pr_fence_acquire                  |   2 +-
 lib/ck/doc/ck_pr_fence_atomic                   |   8 +-
 lib/ck/doc/ck_pr_fence_atomic_load              |   8 +-
 lib/ck/doc/ck_pr_fence_atomic_store             |   8 +-
 lib/ck/doc/ck_pr_fence_load                     |   2 +-
 lib/ck/doc/ck_pr_fence_load_atomic              |   2 +-
 lib/ck/doc/ck_pr_fence_load_depends             |   4 +-
 lib/ck/doc/ck_pr_fence_load_store               |   2 +-
 lib/ck/doc/ck_pr_fence_memory                   |   4 +-
 lib/ck/doc/ck_pr_fence_release                  |   2 +-
 lib/ck/doc/ck_pr_fence_store                    |   4 +-
 lib/ck/doc/ck_pr_fence_store_atomic             |   6 +-
 lib/ck/doc/ck_pr_fence_store_load               |   6 +-
 lib/ck/doc/ck_pr_inc                            |   4 +-
 lib/ck/doc/ck_pr_load                           |   4 +-
 lib/ck/doc/ck_pr_neg                            |   4 +-
 lib/ck/doc/ck_pr_not                            |   4 +-
 lib/ck/doc/ck_pr_or                             |   6 +-
 lib/ck/doc/ck_pr_rtm                            |   2 +-
 lib/ck/doc/ck_pr_stall                          |   6 +-
 lib/ck/doc/ck_pr_store                          |   4 +-
 lib/ck/doc/ck_pr_sub                            |   4 +-
 lib/ck/doc/ck_pr_xor                            |   6 +-
 lib/ck/doc/ck_rhs_apply                         |  86 ++++++
 lib/ck/doc/ck_rhs_count                         |  70 +++++
 lib/ck/doc/ck_rhs_destroy                       |  77 ++++++
 lib/ck/doc/ck_rhs_fas                           |  98 +++++++
 lib/ck/doc/ck_rhs_gc                            |  73 ++++++
 lib/ck/doc/ck_rhs_get                           |  88 +++++++
 lib/ck/doc/ck_rhs_grow                          |  81 ++++++
 lib/ck/doc/ck_rhs_init                          | 166 ++++++++++++
 lib/ck/doc/ck_rhs_iterator_init                 |  78 ++++++
 lib/ck/doc/ck_rhs_move                          |  90 +++++++
 lib/ck/doc/ck_rhs_next                          |  92 +++++++
 lib/ck/doc/ck_rhs_put                           |  98 +++++++
 lib/ck/doc/ck_rhs_put_unique                    |  98 +++++++
 lib/ck/doc/ck_rhs_rebuild                       |  76 ++++++
 lib/ck/doc/ck_rhs_remove                        |  92 +++++++
 lib/ck/doc/ck_rhs_reset                         |  77 ++++++
 lib/ck/doc/ck_rhs_reset_size                    |  80 ++++++
 lib/ck/doc/ck_rhs_set                           | 102 ++++++++
 lib/ck/doc/ck_rhs_stat                          |  80 ++++++
 lib/ck/doc/ck_ring_dequeue_spmc                 |   2 +-
 lib/ck/doc/ck_ring_dequeue_spsc                 |   2 +-
 lib/ck/doc/ck_ring_enqueue_spmc                 |   6 +-
 lib/ck/doc/ck_ring_enqueue_spmc_size            |   6 +-
 lib/ck/doc/ck_ring_enqueue_spsc                 |   6 +-
 lib/ck/doc/ck_ring_enqueue_spsc_size            |   6 +-
 lib/ck/doc/ck_ring_trydequeue_spmc              |   4 +-
 lib/ck/doc/ck_rwcohort                          |   4 +-
 lib/ck/doc/ck_sequence                          |   4 +-
 lib/ck/doc/ck_spinlock                          |   2 +-
 lib/ck/include/ck_array.h                       |   1 -
 lib/ck/include/ck_backoff.h                     |  13 +-
 lib/ck/include/ck_barrier.h                     |   1 -
 lib/ck/include/ck_bitmap.h                      |  30 ++-
 lib/ck/include/ck_brlock.h                      |   1 -
 lib/ck/include/ck_bytelock.h                    |   1 -
 lib/ck/include/ck_cohort.h                      |   1 -
 lib/ck/include/ck_elide.h                       |   3 +-
 lib/ck/include/ck_epoch.h                       |   1 -
 lib/ck/include/ck_fifo.h                        |   1 -
 lib/ck/include/ck_hp.h                          |   1 -
 lib/ck/include/ck_hp_fifo.h                     |   1 -
 lib/ck/include/ck_hp_stack.h                    |   1 -
 lib/ck/include/ck_hs.h                          |   5 +-
 lib/ck/include/ck_ht.h                          |   1 -
 lib/ck/include/ck_limits.h                      |   1 -
 lib/ck/include/ck_malloc.h                      |   1 -
 lib/ck/include/ck_pflock.h                      |   1 -
 lib/ck/include/ck_pr.h                          |   1 -
 lib/ck/include/ck_queue.h                       |   1 -
 lib/ck/include/ck_rhs.h                         |   4 +-
 lib/ck/include/ck_ring.h                        |   3 +-
 lib/ck/include/ck_rwcohort.h                    |   1 -
 lib/ck/include/ck_rwlock.h                      |   1 -
 lib/ck/include/ck_sequence.h                    |   5 +-
 lib/ck/include/ck_spinlock.h                    |   1 -
 lib/ck/include/ck_stack.h                       |   1 -
 lib/ck/include/ck_stdint.h                      |   1 -
 lib/ck/include/ck_swlock.h                      |   1 -
 lib/ck/include/ck_tflock.h                      |   4 +-
 lib/ck/include/gcc/arm/ck_pr.h                  |  46 ++--
 lib/ck/include/spinlock/hclh.h                  |   2 +-
 lib/ck/regressions/ck_bitmap/validate/serial.c  |  28 +-
 lib/ck/regressions/ck_epoch/validate/Makefile   |   5 +-
 .../ck_epoch/validate/ck_epoch_call.c           |  64 +++++
 .../ck_hp/validate/ck_hp_fifo_donner.c          |   8 +-
 lib/ck/regressions/ck_hs/benchmark/Makefile     |   5 +-
 lib/ck/regressions/ck_hs/benchmark/apply.c      | 260 +++++++++++++++++++
 .../ck_hs/benchmark/parallel_bytestring.c       |   2 +-
 lib/ck/regressions/ck_hs/benchmark/serial.c     |   2 +-
 lib/ck/regressions/ck_hs/validate/serial.c      |  72 ++++-
 lib/ck/regressions/ck_rhs/validate/serial.c     |  69 ++++-
 lib/ck/regressions/ck_ring/validate/Makefile    |   5 +-
 .../regressions/ck_ring/validate/ck_ring_spmc.c |   4 +-
 .../ck_ring/validate/ck_ring_spmc_template.c    |  43 +--
 .../regressions/ck_spinlock/validate/Makefile   |   2 +-
 lib/ck/regressions/common.h                     |   3 +-
 lib/ck/src/ck_array.c                           |   1 -
 lib/ck/src/ck_barrier_centralized.c             |   1 -
 lib/ck/src/ck_barrier_combining.c               |   1 -
 lib/ck/src/ck_barrier_dissemination.c           |   1 -
 lib/ck/src/ck_barrier_mcs.c                     |   1 -
 lib/ck/src/ck_barrier_tournament.c              |   1 -
 lib/ck/src/ck_epoch.c                           |  14 +-
 lib/ck/src/ck_hp.c                              |   1 -
 lib/ck/src/ck_hs.c                              | 112 +++++++-
 lib/ck/src/ck_ht.c                              |   3 +-
 lib/ck/src/ck_ht_hash.h                         |   2 +-
 lib/ck/src/ck_rhs.c                             | 150 +++++++++--
 151 files changed, 2878 insertions(+), 336 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0da17e96/lib/ck/build/ck.build.in
----------------------------------------------------------------------
diff --git a/lib/ck/build/ck.build.in b/lib/ck/build/ck.build.in
index 6bcd044..1d6bfe3 100644
--- a/lib/ck/build/ck.build.in
+++ b/lib/ck/build/ck.build.in
@@ -2,8 +2,8 @@ CC=@CC@
 MAKE=make
 SRC_DIR=@SRC_DIR@
 BUILD_DIR=@BUILD_DIR@
-CFLAGS=@CFLAGS@ -I$(SRC_DIR)/include -I$(BUILD_DIR)/include
-LDFLAGS=@LDFLAGS@
+CFLAGS+=@CFLAGS@ -I$(SRC_DIR)/include -I$(BUILD_DIR)/include
+LDFLAGS+=@LDFLAGS@
 ALL_LIBS=@ALL_LIBS@
 LD=@LD@
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0da17e96/lib/ck/build/ck.build.ppc64
----------------------------------------------------------------------
diff --git a/lib/ck/build/ck.build.ppc64 b/lib/ck/build/ck.build.ppc64
index 7dcb4f4..51003f4 100644
--- a/lib/ck/build/ck.build.ppc64
+++ b/lib/ck/build/ck.build.ppc64
@@ -1 +1,2 @@
 CFLAGS+=-m64 -D__ppc64__
+LDFLAGS+=-m64

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0da17e96/lib/ck/build/ck.build.x86
----------------------------------------------------------------------
diff --git a/lib/ck/build/ck.build.x86 b/lib/ck/build/ck.build.x86
index 2758c8a..6e12783 100644
--- a/lib/ck/build/ck.build.x86
+++ b/lib/ck/build/ck.build.x86
@@ -1 +1,2 @@
 CFLAGS+=-m32 -D__x86__ -msse -msse2
+LDFLAGS+=-m32

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0da17e96/lib/ck/build/ck.build.x86_64
----------------------------------------------------------------------
diff --git a/lib/ck/build/ck.build.x86_64 b/lib/ck/build/ck.build.x86_64
index 54643ef..81b378a 100644
--- a/lib/ck/build/ck.build.x86_64
+++ b/lib/ck/build/ck.build.x86_64
@@ -1 +1,2 @@
 CFLAGS+=-m64 -D__x86_64__
+LDFLAGS+=-m64

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0da17e96/lib/ck/configure
----------------------------------------------------------------------
diff --git a/lib/ck/configure b/lib/ck/configure
index 1b31294..57da1bb 100755
--- a/lib/ck/configure
+++ b/lib/ck/configure
@@ -34,7 +34,7 @@ WANT_PIC=yes
 
 P_PWD=`pwd`
 MAINTAINER='[email protected]'
-VERSION=${VERSION:-'0.4.3'}
+VERSION=${VERSION:-'0.4.5'}
 VERSION_MAJOR='0'
 BUILD="$PWD/build/ck.build"
 PREFIX=${PREFIX:-"/usr/local"}
@@ -599,7 +599,7 @@ elif test "$COMPILER" = "gcc" || test "$COMPILER" = "clang" 
|| test "$COMPILER"
                INSTALL_LIBS="install-lib"
        fi
 
-       CFLAGS="-D_XOPEN_SOURCE=600 -D_BSD_SOURCE -std=gnu99 -pedantic -Wall -W 
-Wundef -Wendif-labels -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings 
-Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline 
-Wdisabled-optimization -fstrict-aliasing -O2 -pipe -Wno-parentheses $CFLAGS"
+       CFLAGS="-D_XOPEN_SOURCE=600 -D_BSD_SOURCE -D_DEFAULT_SOURCE -std=gnu99 
-pedantic -Wall -W -Wundef -Wendif-labels -Wshadow -Wpointer-arith -Wcast-align 
-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs 
-Winline -Wdisabled-optimization -fstrict-aliasing -O2 -pipe -Wno-parentheses 
$CFLAGS"
        PTHREAD_CFLAGS="-pthread"
        if test "$COMPILER" = "mingw64"; then
                ENVIRONMENT=64

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0da17e96/lib/ck/doc/CK_COHORT_INIT
----------------------------------------------------------------------
diff --git a/lib/ck/doc/CK_COHORT_INIT b/lib/ck/doc/CK_COHORT_INIT
index 42a2294..94454d9 100644
--- a/lib/ck/doc/CK_COHORT_INIT
+++ b/lib/ck/doc/CK_COHORT_INIT
@@ -38,7 +38,7 @@ Concurrency Kit (libck, \-lck)
 .Sh DESCRIPTION
 Until a cohort instance is initialized using the CK_COHORT_INIT macro, any 
operations
 involving it will have undefined behavior.  After this macro has been called, 
the cohort
-pointed to by the 
+pointed to by the
 .Fa cohort
 argument will use the lock pointed to by
 .Fa global_lock
@@ -48,8 +48,8 @@ as its local lock.
 .Pp
 The cohort will relinquish its global lock after
 .Fa pass_limit
-consecutive acquisitions of its local lock, even if there are other threads 
waiting.  
-If you are unsure of a value to use for the 
+consecutive acquisitions of its local lock, even if there are other threads 
waiting.
+If you are unsure of a value to use for the
 .Fa pass_limit
 argument, you should use CK_COHORT_DEFAULT_LOCAL_PASS_LIMIT.
 .Sh SEE ALSO

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0da17e96/lib/ck/doc/CK_COHORT_LOCK
----------------------------------------------------------------------
diff --git a/lib/ck/doc/CK_COHORT_LOCK b/lib/ck/doc/CK_COHORT_LOCK
index df39ad4..22475f8 100644
--- a/lib/ck/doc/CK_COHORT_LOCK
+++ b/lib/ck/doc/CK_COHORT_LOCK
@@ -38,11 +38,11 @@ Concurrency Kit (libck, \-lck)
 .Sh DESCRIPTION
 This call attempts to acquire both the local and global (if necessary) locks 
from
 .Fa cohort .
-The call will block until both locks have been acquired.  
+The call will block until both locks have been acquired.
 .Fa global_context
-will be passed as the second argument to the function that was provided as the 
+will be passed as the second argument to the function that was provided as the
 .Fa global_lock_method
-argument to CK_COHORT_PROTOTYPE if that method is called, and 
+argument to CK_COHORT_PROTOTYPE if that method is called, and
 .Fa local_context
 will be passed to the function specified by
 .Fa local_lock_method

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0da17e96/lib/ck/doc/CK_COHORT_PROTOTYPE
----------------------------------------------------------------------
diff --git a/lib/ck/doc/CK_COHORT_PROTOTYPE b/lib/ck/doc/CK_COHORT_PROTOTYPE
index f058fb8..7a7b1a7 100644
--- a/lib/ck/doc/CK_COHORT_PROTOTYPE
+++ b/lib/ck/doc/CK_COHORT_PROTOTYPE
@@ -37,7 +37,7 @@ Concurrency Kit (libck, \-lck)
 "LOCK_FXN global_unlock_method" "LOCK_FXN local_lock_method" "LOCK_FXN 
local_unlock_method"
 .Sh DESCRIPTION
 The ck_cohort.h header file does not define any cohort types.  Instead, the 
user must use
-the CK_COHORT_PROTOTYPE or 
+the CK_COHORT_PROTOTYPE or
 .Xr CK_COHORT_TRYLOCK_PROTOTYPE 3
 macros to define any types they want to use.  They must use 
CK_COHORT_TRYLOCK_PROTOTYPE
 if they want their cohort type to support trylock operations.

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0da17e96/lib/ck/doc/CK_COHORT_TRYLOCK
----------------------------------------------------------------------
diff --git a/lib/ck/doc/CK_COHORT_TRYLOCK b/lib/ck/doc/CK_COHORT_TRYLOCK
index fd9306e..22bb4b5 100644
--- a/lib/ck/doc/CK_COHORT_TRYLOCK
+++ b/lib/ck/doc/CK_COHORT_TRYLOCK
@@ -38,18 +38,18 @@ Concurrency Kit (libck, \-lck)
 .Sh DESCRIPTION
 This call attempts to acquire both the local and global (if necessary) locks 
from
 .Fa cohort .
-It can only be used with cohort types that were defined using the 
+It can only be used with cohort types that were defined using the
 .Xr CK_COHORT_TRYLOCK_PROTOTYPE 3
 macro.  The call will not block and will return a bool that will evaluate to 
true iff
-the cohort was successfully acquired.  
+the cohort was successfully acquired.
 .Fa global_trylock_context
-will be passed as the second argument to the function that was provided as the 
+will be passed as the second argument to the function that was provided as the
 .Fa global_trylock_method
-argument to CK_COHORT_TRYLOCK_PROTOTYPE if that method is called, and 
+argument to CK_COHORT_TRYLOCK_PROTOTYPE if that method is called, and
 .Fa local_trylock_context
 will be passed to the function specified by
 .Fa local_trylock_method .
-If the global lock acquisition fails, then the cohort will immediately release 
its 
+If the global lock acquisition fails, then the cohort will immediately release 
its
 local lock as well, and
 .Fa local_unlock_context
 will be passed to the function specified by

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0da17e96/lib/ck/doc/CK_COHORT_TRYLOCK_PROTOTYPE
----------------------------------------------------------------------
diff --git a/lib/ck/doc/CK_COHORT_TRYLOCK_PROTOTYPE 
b/lib/ck/doc/CK_COHORT_TRYLOCK_PROTOTYPE
index 7edc032..dd97ad4 100644
--- a/lib/ck/doc/CK_COHORT_TRYLOCK_PROTOTYPE
+++ b/lib/ck/doc/CK_COHORT_TRYLOCK_PROTOTYPE
@@ -57,7 +57,7 @@ of the other CK_COHORT macros.
 : This method should return true iff the global lock is acquired by a thread.
 .br
 .Fa global_trylock_method
-: The method that should be called to try to acquire the global lock.  
+: The method that should be called to try to acquire the global lock.
 It should not block and return true iff the lock was successfully acquired.
 .br
 .Fa local_lock_method
@@ -70,7 +70,7 @@ It should not block and return true iff the lock was 
successfully acquired.
 : This method should return true iff the global lock is acquired by a thread.
 .br
 .Fa local_trylock_method
-: The method that should be called to try to acquire the local lock.  
+: The method that should be called to try to acquire the local lock.
 It should not block and return true iff the lock was successfully acquired.
 .Pp
 Instances of the defined cohort type can be declared as:

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0da17e96/lib/ck/doc/CK_COHORT_UNLOCK
----------------------------------------------------------------------
diff --git a/lib/ck/doc/CK_COHORT_UNLOCK b/lib/ck/doc/CK_COHORT_UNLOCK
index 6c5440a..a9f302f 100644
--- a/lib/ck/doc/CK_COHORT_UNLOCK
+++ b/lib/ck/doc/CK_COHORT_UNLOCK
@@ -38,11 +38,11 @@ Concurrency Kit (libck, \-lck)
 .Sh DESCRIPTION
 This call instructs
 .Fa cohort
-to relinquish its local lock and potentially its global lock as well.  
+to relinquish its local lock and potentially its global lock as well.
 .Fa global_context
-will be passed as the second argument to the function that was provided as the 
+will be passed as the second argument to the function that was provided as the
 .Fa global_lock_method
-argument to CK_COHORT_PROTOTYPE if that method is called, and 
+argument to CK_COHORT_PROTOTYPE if that method is called, and
 .Fa local_context
 will be passed to the function specified by
 .Fa local_lock_method

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0da17e96/lib/ck/doc/CK_RWCOHORT_INIT
----------------------------------------------------------------------
diff --git a/lib/ck/doc/CK_RWCOHORT_INIT b/lib/ck/doc/CK_RWCOHORT_INIT
index e097039..18d1b33 100644
--- a/lib/ck/doc/CK_RWCOHORT_INIT
+++ b/lib/ck/doc/CK_RWCOHORT_INIT
@@ -40,11 +40,11 @@ Concurrency Kit (libck, \-lck)
 This macro initializes the lock instance pointed to by the
 .Fa lock
 argument.  Until a lock instance is initialized using the CK_RWCOHORT_INIT 
macro, any operations
-involving it will have undefined behavior.  Note that the 
+involving it will have undefined behavior.  Note that the
 .Fa wait_limit
 argument should only be used with reader-preference or writer-preference 
locks.  For neutral
 locks, this argument should be excluded.
-If you are unsure of a value to use for the 
+If you are unsure of a value to use for the
 .Fa wait_limit
 argument, you should use CK_RWCOHORT_STRATEGY_DEFAULT_LOCAL_WAIT_LIMIT.
 .Sh SEE ALSO

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0da17e96/lib/ck/doc/CK_RWCOHORT_INSTANCE
----------------------------------------------------------------------
diff --git a/lib/ck/doc/CK_RWCOHORT_INSTANCE b/lib/ck/doc/CK_RWCOHORT_INSTANCE
index fcdfeea..10251a3 100644
--- a/lib/ck/doc/CK_RWCOHORT_INSTANCE
+++ b/lib/ck/doc/CK_RWCOHORT_INSTANCE
@@ -38,9 +38,9 @@ Concurrency Kit (libck, \-lck)
 .Fn CK_RWCOHORT_WP_INSTANCE "COHORT_NAME cohort_name"
 .Sh DESCRIPTION
 The user must use this macro to declare instances of lock types that they have
-defined using the 
+defined using the
 .Xr CK_RWCOHORT_PROTOTYPE 3
-macro.  The cohort_name must be the same as the one used in the prototype 
macro.  
+macro.  The cohort_name must be the same as the one used in the prototype 
macro.
 For instance, if CK_RWCOHORT_PROTOTYPE was called with the name "foo", the
 CK_RWCOHORT_INSTANCE macro should be called as
 .br

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0da17e96/lib/ck/doc/CK_RWCOHORT_PROTOTYPE
----------------------------------------------------------------------
diff --git a/lib/ck/doc/CK_RWCOHORT_PROTOTYPE b/lib/ck/doc/CK_RWCOHORT_PROTOTYPE
index fb4d25a..a2705b6 100644
--- a/lib/ck/doc/CK_RWCOHORT_PROTOTYPE
+++ b/lib/ck/doc/CK_RWCOHORT_PROTOTYPE
@@ -41,9 +41,9 @@ The ck_rwcohort.h header file does not define any cohort 
types.  Instead, the us
 the CK_RWCOHORT_PROTOTYPE macro to define any types they want to use.
 This macro takes a single argument which corresponds to the type of the cohort 
lock that
 the reader-writer lock should use.  A cohort type must have already been 
defined with that name
-using the 
+using the
 .Xr CK_COHORT_PROTOTYPE 3
-or 
+or
 .Xr CK_COHORT_TRYLOCK_PROTOTYPE 3
 macros.
 .Pp

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0da17e96/lib/ck/doc/CK_RWCOHORT_READ_LOCK
----------------------------------------------------------------------
diff --git a/lib/ck/doc/CK_RWCOHORT_READ_LOCK b/lib/ck/doc/CK_RWCOHORT_READ_LOCK
index bf65853..62831ea 100644
--- a/lib/ck/doc/CK_RWCOHORT_READ_LOCK
+++ b/lib/ck/doc/CK_RWCOHORT_READ_LOCK
@@ -33,24 +33,24 @@
 Concurrency Kit (libck, \-lck)
 .Sh SYNOPSIS
 .In ck_cohort.h
-.Fn CK_RWCOHORT_NEUTRAL_READ_LOCK "COHORT_NAME cohort_name" "LOCK *lock" 
"COHORT *cohort"\ 
+.Fn CK_RWCOHORT_NEUTRAL_READ_LOCK "COHORT_NAME cohort_name" "LOCK *lock" 
"COHORT *cohort"\
 "void *global_context" "void *local_context"
-.Fn CK_RWCOHORT_RP_READ_LOCK "COHORT_NAME cohort_name" "LOCK *lock" "COHORT 
*cohort"\ 
+.Fn CK_RWCOHORT_RP_READ_LOCK "COHORT_NAME cohort_name" "LOCK *lock" "COHORT 
*cohort"\
 "void *global_context" "void *local_context"
-.Fn CK_RWCOHORT_WP_READ_LOCK "COHORT_NAME cohort_name" "LOCK *lock" "COHORT 
*cohort"\ 
+.Fn CK_RWCOHORT_WP_READ_LOCK "COHORT_NAME cohort_name" "LOCK *lock" "COHORT 
*cohort"\
 "void *global_context" "void *local_context"
 .Sh DESCRIPTION
 This call will acquire read-only permission from
 .Fa lock .
-The call will block until this permission has been acquired.  
-.Fa cohort 
-must point to a cohort whose global lock is the same as all other cohorts used 
with 
+The call will block until this permission has been acquired.
+.Fa cohort
+must point to a cohort whose global lock is the same as all other cohorts used 
with
 .Fa lock .
 The
-.Fa global_context 
+.Fa global_context
 and
-.Fa local_context 
-arguments will be passed along as the context arguments to any calls to 
+.Fa local_context
+arguments will be passed along as the context arguments to any calls to
 .Fa cohort .
 .
 .Sh SEE ALSO

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0da17e96/lib/ck/doc/CK_RWCOHORT_READ_UNLOCK
----------------------------------------------------------------------
diff --git a/lib/ck/doc/CK_RWCOHORT_READ_UNLOCK 
b/lib/ck/doc/CK_RWCOHORT_READ_UNLOCK
index 4dd26e1..1c81801 100644
--- a/lib/ck/doc/CK_RWCOHORT_READ_UNLOCK
+++ b/lib/ck/doc/CK_RWCOHORT_READ_UNLOCK
@@ -33,23 +33,23 @@
 Concurrency Kit (libck, \-lck)
 .Sh SYNOPSIS
 .In ck_cohort.h
-.Fn CK_RWCOHORT_NEUTRAL_READ_UNLOCK "COHORT_NAME cohort_name" "LOCK *lock" 
"COHORT *cohort"\ 
+.Fn CK_RWCOHORT_NEUTRAL_READ_UNLOCK "COHORT_NAME cohort_name" "LOCK *lock" 
"COHORT *cohort"\
 "void *global_context" "void *local_context"
-.Fn CK_RWCOHORT_RP_READ_UNLOCK "COHORT_NAME cohort_name" "LOCK *lock" "COHORT 
*cohort"\ 
+.Fn CK_RWCOHORT_RP_READ_UNLOCK "COHORT_NAME cohort_name" "LOCK *lock" "COHORT 
*cohort"\
 "void *global_context" "void *local_context"
-.Fn CK_RWCOHORT_WP_READ_UNLOCK "COHORT_NAME cohort_name" "LOCK *lock" "COHORT 
*cohort"\ 
+.Fn CK_RWCOHORT_WP_READ_UNLOCK "COHORT_NAME cohort_name" "LOCK *lock" "COHORT 
*cohort"\
 "void *global_context" "void *local_context"
 .Sh DESCRIPTION
 This call will relinquish read-only permission to
 .Fa lock .
-.Fa cohort 
-must point to a cohort whose global lock is the same as all other cohorts used 
with 
+.Fa cohort
+must point to a cohort whose global lock is the same as all other cohorts used 
with
 .Fa lock .
 The
-.Fa global_context 
+.Fa global_context
 and
-.Fa local_context 
-arguments will be passed along as the context arguments to any calls to 
+.Fa local_context
+arguments will be passed along as the context arguments to any calls to
 .Fa cohort .
 .
 .Sh SEE ALSO

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0da17e96/lib/ck/doc/CK_RWCOHORT_WRITE_LOCK
----------------------------------------------------------------------
diff --git a/lib/ck/doc/CK_RWCOHORT_WRITE_LOCK 
b/lib/ck/doc/CK_RWCOHORT_WRITE_LOCK
index 0977cb7..161c7bb 100644
--- a/lib/ck/doc/CK_RWCOHORT_WRITE_LOCK
+++ b/lib/ck/doc/CK_RWCOHORT_WRITE_LOCK
@@ -33,24 +33,24 @@
 Concurrency Kit (libck, \-lck)
 .Sh SYNOPSIS
 .In ck_cohort.h
-.Fn CK_RWCOHORT_NEUTRAL_WRITE_LOCK "COHORT_NAME cohort_name" "LOCK *lock" 
"COHORT *cohort"\ 
+.Fn CK_RWCOHORT_NEUTRAL_WRITE_LOCK "COHORT_NAME cohort_name" "LOCK *lock" 
"COHORT *cohort"\
 "void *global_context" "void *local_context"
-.Fn CK_RWCOHORT_RP_WRITE_LOCK "COHORT_NAME cohort_name" "LOCK *lock" "COHORT 
*cohort"\ 
+.Fn CK_RWCOHORT_RP_WRITE_LOCK "COHORT_NAME cohort_name" "LOCK *lock" "COHORT 
*cohort"\
 "void *global_context" "void *local_context"
-.Fn CK_RWCOHORT_WP_WRITE_LOCK "COHORT_NAME cohort_name" "LOCK *lock" "COHORT 
*cohort"\ 
+.Fn CK_RWCOHORT_WP_WRITE_LOCK "COHORT_NAME cohort_name" "LOCK *lock" "COHORT 
*cohort"\
 "void *global_context" "void *local_context"
 .Sh DESCRIPTION
 This call will acquire write permission for
 .Fa lock .
-The call will block until this permission has been acquired.  
-.Fa cohort 
-must point to a cohort whose global lock is the same as all other cohorts used 
with 
+The call will block until this permission has been acquired.
+.Fa cohort
+must point to a cohort whose global lock is the same as all other cohorts used 
with
 .Fa lock .
 The
-.Fa global_context 
+.Fa global_context
 and
-.Fa local_context 
-arguments will be passed along as the context arguments to any calls to 
+.Fa local_context
+arguments will be passed along as the context arguments to any calls to
 .Fa cohort .
 .
 .Sh SEE ALSO

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0da17e96/lib/ck/doc/CK_RWCOHORT_WRITE_UNLOCK
----------------------------------------------------------------------
diff --git a/lib/ck/doc/CK_RWCOHORT_WRITE_UNLOCK 
b/lib/ck/doc/CK_RWCOHORT_WRITE_UNLOCK
index c3537bf..5772a9f 100644
--- a/lib/ck/doc/CK_RWCOHORT_WRITE_UNLOCK
+++ b/lib/ck/doc/CK_RWCOHORT_WRITE_UNLOCK
@@ -33,23 +33,23 @@
 Concurrency Kit (libck, \-lck)
 .Sh SYNOPSIS
 .In ck_cohort.h
-.Fn CK_RWCOHORT_NEUTRAL_WRITE_UNLOCK "COHORT_NAME cohort_name" "LOCK *lock" 
"COHORT *cohort"\ 
+.Fn CK_RWCOHORT_NEUTRAL_WRITE_UNLOCK "COHORT_NAME cohort_name" "LOCK *lock" 
"COHORT *cohort"\
 "void *global_context" "void *local_context"
-.Fn CK_RWCOHORT_RP_WRITE_UNLOCK "COHORT_NAME cohort_name" "LOCK *lock" "COHORT 
*cohort"\ 
+.Fn CK_RWCOHORT_RP_WRITE_UNLOCK "COHORT_NAME cohort_name" "LOCK *lock" "COHORT 
*cohort"\
 "void *global_context" "void *local_context"
-.Fn CK_RWCOHORT_WP_WRITE_UNLOCK "COHORT_NAME cohort_name" "LOCK *lock" "COHORT 
*cohort"\ 
+.Fn CK_RWCOHORT_WP_WRITE_UNLOCK "COHORT_NAME cohort_name" "LOCK *lock" "COHORT 
*cohort"\
 "void *global_context" "void *local_context"
 .Sh DESCRIPTION
 This call will relinquish write permission for
 .Fa lock .
-.Fa cohort 
-must point to a cohort whose global lock is the same as all other cohorts used 
with 
+.Fa cohort
+must point to a cohort whose global lock is the same as all other cohorts used 
with
 .Fa lock .
 The
-.Fa global_context 
+.Fa global_context
 and
-.Fa local_context 
-arguments will be passed along as the context arguments to any calls to 
+.Fa local_context
+arguments will be passed along as the context arguments to any calls to
 .Fa cohort .
 .
 .Sh SEE ALSO

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0da17e96/lib/ck/doc/Makefile.in
----------------------------------------------------------------------
diff --git a/lib/ck/doc/Makefile.in b/lib/ck/doc/Makefile.in
index ff24a91..dbd9daa 100644
--- a/lib/ck/doc/Makefile.in
+++ b/lib/ck/doc/Makefile.in
@@ -48,6 +48,7 @@ OBJECTS=CK_ARRAY_FOREACH              \
        ck_bitmap_init                  \
        ck_bitmap_reset                 \
        ck_bitmap_set                   \
+       ck_bitmap_bts                   \
        ck_bitmap_test                  \
        ck_bitmap_base                  \
        ck_bitmap_union                 \
@@ -73,6 +74,7 @@ OBJECTS=CK_ARRAY_FOREACH              \
        ck_hs_init                      \
        ck_hs_destroy                   \
        CK_HS_HASH                      \
+       ck_hs_apply                     \
        ck_hs_iterator_init             \
        ck_hs_next                      \
        ck_hs_get                       \
@@ -87,6 +89,25 @@ OBJECTS=CK_ARRAY_FOREACH             \
        ck_hs_reset                     \
        ck_hs_reset_size                \
        ck_hs_stat                      \
+       ck_rhs_gc                       \
+       ck_rhs_init                     \
+       ck_rhs_destroy                  \
+       CK_RHS_HASH                     \
+       ck_rhs_apply                    \
+       ck_rhs_iterator_init            \
+       ck_rhs_next                     \
+       ck_rhs_get                      \
+       ck_rhs_put                      \
+       ck_rhs_set                      \
+       ck_rhs_fas                      \
+       ck_rhs_remove                   \
+       ck_rhs_move                     \
+       ck_rhs_grow                     \
+       ck_rhs_rebuild                  \
+       ck_rhs_count                    \
+       ck_rhs_reset                    \
+       ck_rhs_reset_size               \
+       ck_rhs_stat                     \
        ck_rwcohort                     \
        CK_RWCOHORT_INIT                \
        CK_RWCOHORT_INSTANCE            \

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0da17e96/lib/ck/doc/ck_bitmap_bts
----------------------------------------------------------------------
diff --git a/lib/ck/doc/ck_bitmap_bts b/lib/ck/doc/ck_bitmap_bts
new file mode 100644
index 0000000..872284c
--- /dev/null
+++ b/lib/ck/doc/ck_bitmap_bts
@@ -0,0 +1,61 @@
+.\"
+.\" Copyright 2014 David Joseph.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\"
+.Dd August 22, 2014
+.Dt CK_BITMAP_BTS 3
+.Sh NAME
+.Nm ck_bitmap_bts
+.Nd set the bit at the specified index and fetch its original value
+.Sh LIBRARY
+Concurrency Kit (libck, \-lck)
+.Sh SYNOPSIS
+.In ck_bitmap.h
+.Ft bool
+.Fn ck_bitmap_bts "ck_bitmap_t *bitmap" "unsigned int n"
+.Sh DESCRIPTION
+.Fn ck_bitmap_bts
+sets the bit at the offset specified by the argument
+.Fa n
+to
+.Dv 1
+and fetches its original value.
+.Sh RETURN VALUES
+This function returns the original value of the bit at offset
+.Fa n
+in
+.Fa bitmap .
+.Sh SEE ALSO
+.Xr ck_bitmap_base 3 ,
+.Xr ck_bitmap_size 3 ,
+.Xr ck_bitmap_init 3 ,
+.Xr ck_bitmap_reset 3 ,
+.Xr ck_bitmap_clear 3 ,
+.Xr ck_bitmap_set 3 ,
+.Xr ck_bitmap_test 3 ,
+.Xr ck_bitmap_bits 3 ,
+.Xr ck_bitmap_buffer 3
+.Pp
+Additional information available at http://concurrencykit.org/

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0da17e96/lib/ck/doc/ck_cohort
----------------------------------------------------------------------
diff --git a/lib/ck/doc/ck_cohort b/lib/ck/doc/ck_cohort
index b033c91..4905418 100644
--- a/lib/ck/doc/ck_cohort
+++ b/lib/ck/doc/ck_cohort
@@ -57,7 +57,7 @@ BOOL_LOCK_FXN refers to a method with the signature
 bool(void *lock, void *context)
 .Pp
 The
-.Fa context 
+.Fa context
 argument in each signature is used to pass along any additional information 
that
 the lock might need for its lock, unlock and trylock methods.  The values for 
this
 argument are provided to each call to
@@ -94,7 +94,7 @@ man pages for more details.
 #include <ck_cohort.h>
 #include <ck_spinlock.h>
 
-/* 
+/*
  * Create cohort methods with signatures that match
  * the required signature
  */
@@ -169,7 +169,7 @@ main(void)
            calloc(n_cohorts, sizeof(CK_COHORT_INSTANCE(test_cohort)));
 
        /* create local locks to use with each cohort */
-       ck_spinlock_t *local_locks = 
+       ck_spinlock_t *local_locks =
                calloc(n_cohorts, sizeof(ck_spinlock_t));
 
        pthread_t *threads =

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0da17e96/lib/ck/doc/ck_elide
----------------------------------------------------------------------
diff --git a/lib/ck/doc/ck_elide b/lib/ck/doc/ck_elide
index 3a63e74..c068567 100644
--- a/lib/ck/doc/ck_elide
+++ b/lib/ck/doc/ck_elide
@@ -100,7 +100,7 @@ returns true, then the
 .Fa UNLOCK_FUNCTION
 is executed. If RTM is unsupported (no CK_F_PR_RTM macro) then
 .Fn CK_ELIDE_LOCK
-and 
+and
 .Fn CK_ELIDE_LOCK_ADAPTIVE
 will immediately call
 .Fn LOCK_FUNCTION .
@@ -118,7 +118,7 @@ Elision is attempted if the
 .Fa LOCK_PREDICATE
 function returns false. If
 .Fa LOCK_PREDICATE
-returns true or if elision fails then the 
+returns true or if elision fails then the
 operation is aborted. If RTM is unsupported
 (no CK_F_PR_RTM macro) then
 .Fn CK_ELIDE_TRYLOCK

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0da17e96/lib/ck/doc/ck_epoch_call
----------------------------------------------------------------------
diff --git a/lib/ck/doc/ck_epoch_call b/lib/ck/doc/ck_epoch_call
index 4f6286e..288814e 100644
--- a/lib/ck/doc/ck_epoch_call
+++ b/lib/ck/doc/ck_epoch_call
@@ -46,7 +46,7 @@ function will defer the execution of the function pointed to 
by
 until a grace-period has been detected in
 .Fa epoch .
 The function will be provided
-the pointer specified by 
+the pointer specified by
 .Fa entry .
 The function will execute at some time in the future via calls to
 .Fn ck_epoch_reclaim 3 ,

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0da17e96/lib/ck/doc/ck_epoch_init
----------------------------------------------------------------------
diff --git a/lib/ck/doc/ck_epoch_init b/lib/ck/doc/ck_epoch_init
index e22294d..51a3e2a 100644
--- a/lib/ck/doc/ck_epoch_init
+++ b/lib/ck/doc/ck_epoch_init
@@ -52,7 +52,7 @@ is undefined if
 .Fa epoch
 is not a pointer to a
 .Tn ck_epoch_t
-object. 
+object.
 .El
 .Sh SEE ALSO
 .Xr ck_epoch_register 3 ,

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0da17e96/lib/ck/doc/ck_hs_apply
----------------------------------------------------------------------
diff --git a/lib/ck/doc/ck_hs_apply b/lib/ck/doc/ck_hs_apply
new file mode 100644
index 0000000..5664f73
--- /dev/null
+++ b/lib/ck/doc/ck_hs_apply
@@ -0,0 +1,86 @@
+.\"
+.\" Copyright 2014 Samy Al Bahra.
+.\" Copyright 2014 Backtrace I/O, Inc.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\"
+.Dd September 1, 2014
+.Dt CK_HS_APPLY 3
+.Sh NAME
+.Nm ck_hs_apply
+.Nd apply a function to hash set value
+.Sh LIBRARY
+Concurrency Kit (libck, \-lck)
+.Sh SYNOPSIS
+.In ck_hs.h
+.Ft void *
+.Fn ck_hs_apply_fn_t "void *key" "void *closure"
+.Ft bool
+.Fn ck_hs_apply "ck_hs_t *hs" "unsigned long hash" "const void *key" 
"ck_hs_apply_fn_t *function" "void *argument"
+.Sh DESCRIPTION
+The
+.Fn ck_hs_apply 3
+function will lookup the hash set slot associated with
+.Fa key
+and pass it to function pointed to by
+.Fa function
+for further action. This callback may remove or replace
+the value by respectively returning NULL or a pointer to
+another object with an identical key. The first argument
+passed to
+.Fa function
+is a pointer to the object found in the hash set and
+the second argument is the
+.Fa argument
+pointer passed to
+.Fn ck_hs_apply 3 .
+If the pointer returned by
+.Fa function
+is equivalent to the first argument then no modification
+is made to the hash set.
+.Sh RETURN VALUES
+Upon successful completion,
+.Fn ck_hs_apply 3
+returns true and otherwise returns false on failure.
+.Sh SEE ALSO
+.Xr ck_hs_init 3 ,
+.Xr ck_hs_move 3 ,
+.Xr ck_hs_destroy 3 ,
+.Xr ck_hs_fas 3 ,
+.Xr CK_HS_HASH 3 ,
+.Xr ck_hs_iterator_init 3 ,
+.Xr ck_hs_next 3 ,
+.Xr ck_hs_get 3 ,
+.Xr ck_hs_put 3 ,
+.Xr ck_hs_put_unique 3 ,
+.Xr ck_hs_remove 3 ,
+.Xr ck_hs_grow 3 ,
+.Xr ck_hs_rebuild 3 ,
+.Xr ck_hs_gc 3 ,
+.Xr ck_hs_count 3 ,
+.Xr ck_hs_reset 3 ,
+.Xr ck_hs_reset_size 3 ,
+.Xr ck_hs_stat 3
+.Pp
+Additional information available at http://concurrencykit.org/

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0da17e96/lib/ck/doc/ck_hs_fas
----------------------------------------------------------------------
diff --git a/lib/ck/doc/ck_hs_fas b/lib/ck/doc/ck_hs_fas
index 213cef6..69760b5 100644
--- a/lib/ck/doc/ck_hs_fas
+++ b/lib/ck/doc/ck_hs_fas
@@ -57,7 +57,7 @@ was successful then the key specified by
 was successfully stored in the hash set pointed to by
 .Fa hs .
 The key must already exist in the hash set, and is
-replaced by 
+replaced by
 .Fa key
 and the previous value is stored into the void pointer
 pointed to by the
@@ -75,7 +75,7 @@ Behavior is undefined if
 .Fa key
 or
 .Fa hs
-are uninitialized. 
+are uninitialized.
 .Sh SEE ALSO
 .Xr ck_hs_init 3 ,
 .Xr ck_hs_move 3 ,

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0da17e96/lib/ck/doc/ck_hs_move
----------------------------------------------------------------------
diff --git a/lib/ck/doc/ck_hs_move b/lib/ck/doc/ck_hs_move
index e843ea7..1d30195 100644
--- a/lib/ck/doc/ck_hs_move
+++ b/lib/ck/doc/ck_hs_move
@@ -38,7 +38,7 @@ Concurrency Kit (libck, \-lck)
 .Sh DESCRIPTION
 The
 .Fn ck_hs_move 3
-function will initialize 
+function will initialize
 .Fa source
 from
 .Fa destination .

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0da17e96/lib/ck/doc/ck_hs_next
----------------------------------------------------------------------
diff --git a/lib/ck/doc/ck_hs_next b/lib/ck/doc/ck_hs_next
index 1e41301..67e083e 100644
--- a/lib/ck/doc/ck_hs_next
+++ b/lib/ck/doc/ck_hs_next
@@ -33,7 +33,7 @@
 Concurrency Kit (libck, \-lck)
 .Sh SYNOPSIS
 .In ck_hs.h
-.Ft bool 
+.Ft bool
 .Fn ck_hs_next "ck_hs_t *hs" "ck_hs_iterator_t *iterator" "void **entry"
 .Sh DESCRIPTION
 The

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0da17e96/lib/ck/doc/ck_hs_set
----------------------------------------------------------------------
diff --git a/lib/ck/doc/ck_hs_set b/lib/ck/doc/ck_hs_set
index 0df792a..e9ba9f1 100644
--- a/lib/ck/doc/ck_hs_set
+++ b/lib/ck/doc/ck_hs_set
@@ -57,7 +57,7 @@ was successful then the key specified by
 was successfully stored in the hash set pointed to by
 .Fa hs .
 If the key already exists in the hash set, then it is
-replaced by 
+replaced by
 .Fa key
 and the previous value is stored into the void pointer
 pointed to by the

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0da17e96/lib/ck/doc/ck_pr
----------------------------------------------------------------------
diff --git a/lib/ck/doc/ck_pr b/lib/ck/doc/ck_pr
index df7ce91..67c726f 100644
--- a/lib/ck/doc/ck_pr
+++ b/lib/ck/doc/ck_pr
@@ -38,7 +38,7 @@ ck_pr.h provides an interface to volatile atomic instructions,
 memory barriers and busy-wait facilities as provided by the
 underlying processor. The presence of an atomic operation
 is detected by the presence of a corresponding CK_F_PR macro.
-For example, the availability of 
+For example, the availability of
 .Xr ck_pr_add_16 3
 would be determined by the presence of CK_F_PR_ADD_16.
 .Sh SEE ALSO
@@ -56,7 +56,7 @@ would be determined by the presence of CK_F_PR_ADD_16.
 .Xr ck_pr_faa 3 ,
 .Xr ck_pr_inc 3 ,
 .Xr ck_pr_dec 3 ,
-.Xr ck_pr_neg 3 , 
+.Xr ck_pr_neg 3 ,
 .Xr ck_pr_not 3 ,
 .Xr ck_pr_add 3 ,
 .Xr ck_pr_sub 3 ,

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0da17e96/lib/ck/doc/ck_pr_add
----------------------------------------------------------------------
diff --git a/lib/ck/doc/ck_pr_add b/lib/ck/doc/ck_pr_add
index 77a3ad2..b4d394a 100644
--- a/lib/ck/doc/ck_pr_add
+++ b/lib/ck/doc/ck_pr_add
@@ -60,7 +60,7 @@ Concurrency Kit (libck, \-lck)
 .Ft void
 .Fn ck_pr_add_8 "uint8_t *target" "uint8_t delta"
 .Sh DESCRIPTION
-The 
+The
 .Fn ck_pr_add 3
 family of functions atomically add the value specified by
 .Fa delta
@@ -79,7 +79,7 @@ This family of functions does not have a return value.
 .Xr ck_pr_faa 3 ,
 .Xr ck_pr_inc 3 ,
 .Xr ck_pr_dec 3 ,
-.Xr ck_pr_neg 3 , 
+.Xr ck_pr_neg 3 ,
 .Xr ck_pr_not 3 ,
 .Xr ck_pr_sub 3 ,
 .Xr ck_pr_and 3 ,

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0da17e96/lib/ck/doc/ck_pr_and
----------------------------------------------------------------------
diff --git a/lib/ck/doc/ck_pr_and b/lib/ck/doc/ck_pr_and
index bd40252..56ce5af 100644
--- a/lib/ck/doc/ck_pr_and
+++ b/lib/ck/doc/ck_pr_and
@@ -57,9 +57,9 @@ Concurrency Kit (libck, \-lck)
 .Ft void
 .Fn ck_pr_and_8 "uint8_t *target" "uint8_t delta"
 .Sh DESCRIPTION
-The 
+The
 .Fn ck_pr_and 3
-family of functions atomically compute and store the 
+family of functions atomically compute and store the
 result of a bitwise-and of the value pointed to by
 .Fa target
 and
@@ -79,7 +79,7 @@ This family of functions does not have a return value.
 .Xr ck_pr_faa 3 ,
 .Xr ck_pr_inc 3 ,
 .Xr ck_pr_dec 3 ,
-.Xr ck_pr_neg 3 , 
+.Xr ck_pr_neg 3 ,
 .Xr ck_pr_not 3 ,
 .Xr ck_pr_add 3 ,
 .Xr ck_pr_sub 3 ,

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0da17e96/lib/ck/doc/ck_pr_barrier
----------------------------------------------------------------------
diff --git a/lib/ck/doc/ck_pr_barrier b/lib/ck/doc/ck_pr_barrier
index 128bf38..3886729 100644
--- a/lib/ck/doc/ck_pr_barrier
+++ b/lib/ck/doc/ck_pr_barrier
@@ -36,7 +36,7 @@ Concurrency Kit (libck, \-lck)
 .Ft void
 .Fn ck_pr_barrier void
 .Sh DESCRIPTION
-The 
+The
 .Fn ck_pr_barrier 3
 function is used to disable code movement optimizations
 across the invocation of the function.
@@ -51,7 +51,7 @@ across the invocation of the function.
 .Xr ck_pr_faa 3 ,
 .Xr ck_pr_inc 3 ,
 .Xr ck_pr_dec 3 ,
-.Xr ck_pr_neg 3 , 
+.Xr ck_pr_neg 3 ,
 .Xr ck_pr_not 3 ,
 .Xr ck_pr_add 3 ,
 .Xr ck_pr_sub 3 ,

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0da17e96/lib/ck/doc/ck_pr_btc
----------------------------------------------------------------------
diff --git a/lib/ck/doc/ck_pr_btc b/lib/ck/doc/ck_pr_btc
index bbf226f..5956221 100644
--- a/lib/ck/doc/ck_pr_btc
+++ b/lib/ck/doc/ck_pr_btc
@@ -51,13 +51,13 @@ Concurrency Kit (libck, \-lck)
 .Ft bool
 .Fn ck_pr_btc_16 "uint16_t *target" "unsigned int bit_index"
 .Sh DESCRIPTION
-The 
+The
 .Fn ck_pr_btc 3
 family of functions atomically fetch the value
 of the bit in
 .Fa target
 at index
-.Fa bit_index 
+.Fa bit_index
 and set that bit to its complement.
 .Sh RETURN VALUES
 These family of functions return the original value of
@@ -76,7 +76,7 @@ that is in the value pointed to by
 .Xr ck_pr_faa 3 ,
 .Xr ck_pr_inc 3 ,
 .Xr ck_pr_dec 3 ,
-.Xr ck_pr_neg 3 , 
+.Xr ck_pr_neg 3 ,
 .Xr ck_pr_not 3 ,
 .Xr ck_pr_sub 3 ,
 .Xr ck_pr_and 3 ,

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0da17e96/lib/ck/doc/ck_pr_btr
----------------------------------------------------------------------
diff --git a/lib/ck/doc/ck_pr_btr b/lib/ck/doc/ck_pr_btr
index 1c7760b..d5e03fd 100644
--- a/lib/ck/doc/ck_pr_btr
+++ b/lib/ck/doc/ck_pr_btr
@@ -51,13 +51,13 @@ Concurrency Kit (libck, \-lck)
 .Ft bool
 .Fn ck_pr_btr_16 "uint16_t *target" "unsigned int bit_index"
 .Sh DESCRIPTION
-The 
+The
 .Fn ck_pr_btr 3
 family of functions atomically fetch the value
 of the bit in
 .Fa target
 at index
-.Fa bit_index 
+.Fa bit_index
 and set that bit to 0.
 .Sh RETURN VALUES
 This family of functions returns the original value of
@@ -76,7 +76,7 @@ that is in the value pointed to by
 .Xr ck_pr_faa 3 ,
 .Xr ck_pr_inc 3 ,
 .Xr ck_pr_dec 3 ,
-.Xr ck_pr_neg 3 , 
+.Xr ck_pr_neg 3 ,
 .Xr ck_pr_not 3 ,
 .Xr ck_pr_sub 3 ,
 .Xr ck_pr_and 3 ,

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0da17e96/lib/ck/doc/ck_pr_bts
----------------------------------------------------------------------
diff --git a/lib/ck/doc/ck_pr_bts b/lib/ck/doc/ck_pr_bts
index 4ee6163..955855d 100644
--- a/lib/ck/doc/ck_pr_bts
+++ b/lib/ck/doc/ck_pr_bts
@@ -51,13 +51,13 @@ Concurrency Kit (libck, \-lck)
 .Ft bool
 .Fn ck_pr_bts_16 "uint16_t *target" "unsigned int bit_index"
 .Sh DESCRIPTION
-The 
+The
 .Fn ck_pr_bts 3
 family of functions atomically fetch the value
 of the bit in
 .Fa target
 at index
-.Fa bit_index 
+.Fa bit_index
 and set that bit to 1.
 .Sh RETURN VALUES
 This family of functions returns the original value of
@@ -76,7 +76,7 @@ that is in the value pointed to by
 .Xr ck_pr_faa 3 ,
 .Xr ck_pr_inc 3 ,
 .Xr ck_pr_dec 3 ,
-.Xr ck_pr_neg 3 , 
+.Xr ck_pr_neg 3 ,
 .Xr ck_pr_not 3 ,
 .Xr ck_pr_sub 3 ,
 .Xr ck_pr_and 3 ,

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0da17e96/lib/ck/doc/ck_pr_cas
----------------------------------------------------------------------
diff --git a/lib/ck/doc/ck_pr_cas b/lib/ck/doc/ck_pr_cas
index e0b4674..1fa3a88 100644
--- a/lib/ck/doc/ck_pr_cas
+++ b/lib/ck/doc/ck_pr_cas
@@ -99,9 +99,9 @@ Concurrency Kit (libck, \-lck)
 .Ft bool
 .Fn ck_pr_cas_8_value "uint8_t *target" "uint8_t old_value" "uint8_t 
new_value" "uint8_t *original_value"
 .Sh DESCRIPTION
-The 
+The
 .Fn ck_pr_cas 3
-family of functions atomically compare the value in 
+family of functions atomically compare the value in
 .Fa target
 for equality with
 .Fa old_value
@@ -133,7 +133,7 @@ return false.
 .Xr ck_pr_faa 3 ,
 .Xr ck_pr_inc 3 ,
 .Xr ck_pr_dec 3 ,
-.Xr ck_pr_neg 3 , 
+.Xr ck_pr_neg 3 ,
 .Xr ck_pr_not 3 ,
 .Xr ck_pr_sub 3 ,
 .Xr ck_pr_and 3 ,

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0da17e96/lib/ck/doc/ck_pr_dec
----------------------------------------------------------------------
diff --git a/lib/ck/doc/ck_pr_dec b/lib/ck/doc/ck_pr_dec
index c3bc7b4..f3d34dd 100644
--- a/lib/ck/doc/ck_pr_dec
+++ b/lib/ck/doc/ck_pr_dec
@@ -87,7 +87,7 @@ Concurrency Kit (libck, \-lck)
 .Ft void
 .Fn ck_pr_dec_8_zero "uint8_t *target" "bool *z"
 .Sh DESCRIPTION
-The 
+The
 .Fn ck_pr_dec 3
 family of functions atomically decrement the value pointed to
 by
@@ -109,7 +109,7 @@ to false otherwise.
 .Xr ck_pr_fas 3 ,
 .Xr ck_pr_faa 3 ,
 .Xr ck_pr_inc 3 ,
-.Xr ck_pr_neg 3 , 
+.Xr ck_pr_neg 3 ,
 .Xr ck_pr_not 3 ,
 .Xr ck_pr_add 3 ,
 .Xr ck_pr_sub 3 ,

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0da17e96/lib/ck/doc/ck_pr_faa
----------------------------------------------------------------------
diff --git a/lib/ck/doc/ck_pr_faa b/lib/ck/doc/ck_pr_faa
index 06e0761..fbeff01 100644
--- a/lib/ck/doc/ck_pr_faa
+++ b/lib/ck/doc/ck_pr_faa
@@ -60,7 +60,7 @@ Concurrency Kit (libck, \-lck)
 .Ft uint8_t
 .Fn ck_pr_faa_8 "uint8_t *target" "uint8_t delta"
 .Sh DESCRIPTION
-The 
+The
 .Fn ck_pr_faa 3
 family of functions atomically fetch the value pointed to
 by
@@ -84,7 +84,7 @@ addition operation is applied.
 .Xr ck_pr_fas 3 ,
 .Xr ck_pr_inc 3 ,
 .Xr ck_pr_dec 3 ,
-.Xr ck_pr_neg 3 , 
+.Xr ck_pr_neg 3 ,
 .Xr ck_pr_not 3 ,
 .Xr ck_pr_add 3 ,
 .Xr ck_pr_sub 3 ,

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0da17e96/lib/ck/doc/ck_pr_fas
----------------------------------------------------------------------
diff --git a/lib/ck/doc/ck_pr_fas b/lib/ck/doc/ck_pr_fas
index 5059151..037b104 100644
--- a/lib/ck/doc/ck_pr_fas
+++ b/lib/ck/doc/ck_pr_fas
@@ -60,7 +60,7 @@ Concurrency Kit (libck, \-lck)
 .Ft uint8_t
 .Fn ck_pr_fas_8 "uint8_t *target" "uint8_t new_value"
 .Sh DESCRIPTION
-The 
+The
 .Fn ck_pr_fas 3
 family of functions atomically fetch the value pointed to
 by
@@ -85,7 +85,7 @@ atomically replaced with
 .Xr ck_pr_faa 3 ,
 .Xr ck_pr_inc 3 ,
 .Xr ck_pr_dec 3 ,
-.Xr ck_pr_neg 3 , 
+.Xr ck_pr_neg 3 ,
 .Xr ck_pr_not 3 ,
 .Xr ck_pr_add 3 ,
 .Xr ck_pr_sub 3 ,

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0da17e96/lib/ck/doc/ck_pr_fence_acquire
----------------------------------------------------------------------
diff --git a/lib/ck/doc/ck_pr_fence_acquire b/lib/ck/doc/ck_pr_fence_acquire
index 9da53c0..2d6b997 100644
--- a/lib/ck/doc/ck_pr_fence_acquire
+++ b/lib/ck/doc/ck_pr_fence_acquire
@@ -57,7 +57,7 @@ This function has no return value.
 .Xr ck_pr_faa 3 ,
 .Xr ck_pr_inc 3 ,
 .Xr ck_pr_dec 3 ,
-.Xr ck_pr_neg 3 , 
+.Xr ck_pr_neg 3 ,
 .Xr ck_pr_not 3 ,
 .Xr ck_pr_add 3 ,
 .Xr ck_pr_sub 3 ,

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0da17e96/lib/ck/doc/ck_pr_fence_atomic
----------------------------------------------------------------------
diff --git a/lib/ck/doc/ck_pr_fence_atomic b/lib/ck/doc/ck_pr_fence_atomic
index 452606b..65ed270 100644
--- a/lib/ck/doc/ck_pr_fence_atomic
+++ b/lib/ck/doc/ck_pr_fence_atomic
@@ -25,7 +25,7 @@
 .\"
 .\"
 .Dd May 16, 2013
-.Dt CK_PR_FENCE_ATOMIC 3 
+.Dt CK_PR_FENCE_ATOMIC 3
 .Sh NAME
 .Nm ck_pr_fence_atomic
 .Nd enforce partial ordering of atomic read-modify-write operations
@@ -38,9 +38,9 @@ Concurrency Kit (libck, \-lck)
 .Ft void
 .Fn ck_pr_fence_strict_atomic void
 .Sh DESCRIPTION
-The 
+The
 .Fn ck_pr_fence_atomic
-function enfores the ordering of any 
+function enfores the ordering of any
 atomic read-modify-write operations relative to
 the invocation of the function. This function
 always serve as an implicit compiler barrier. On
@@ -96,7 +96,7 @@ This function has no return value.
 .Xr ck_pr_faa 3 ,
 .Xr ck_pr_inc 3 ,
 .Xr ck_pr_dec 3 ,
-.Xr ck_pr_neg 3 , 
+.Xr ck_pr_neg 3 ,
 .Xr ck_pr_not 3 ,
 .Xr ck_pr_add 3 ,
 .Xr ck_pr_sub 3 ,

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0da17e96/lib/ck/doc/ck_pr_fence_atomic_load
----------------------------------------------------------------------
diff --git a/lib/ck/doc/ck_pr_fence_atomic_load 
b/lib/ck/doc/ck_pr_fence_atomic_load
index cbefdaa..22925ea 100644
--- a/lib/ck/doc/ck_pr_fence_atomic_load
+++ b/lib/ck/doc/ck_pr_fence_atomic_load
@@ -25,7 +25,7 @@
 .\"
 .\"
 .Dd May 16, 2013
-.Dt CK_PR_FENCE_ATOMIC_LOAD 3 
+.Dt CK_PR_FENCE_ATOMIC_LOAD 3
 .Sh NAME
 .Nm ck_pr_fence_atomic_load
 .Nd enforce ordering of atomic read-modify-write operations to load operations
@@ -38,9 +38,9 @@ Concurrency Kit (libck, \-lck)
 .Ft void
 .Fn ck_pr_fence_strict_atomic_load void
 .Sh DESCRIPTION
-The 
+The
 .Fn ck_pr_fence_atomic_load
-function enfores the ordering of any 
+function enfores the ordering of any
 atomic read-modify-write operations relative to
 any load operations following the function invocation. This function
 always serve as an implicit compiler barrier. On
@@ -93,7 +93,7 @@ This function has no return value.
 .Xr ck_pr_faa 3 ,
 .Xr ck_pr_inc 3 ,
 .Xr ck_pr_dec 3 ,
-.Xr ck_pr_neg 3 , 
+.Xr ck_pr_neg 3 ,
 .Xr ck_pr_not 3 ,
 .Xr ck_pr_add 3 ,
 .Xr ck_pr_sub 3 ,

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0da17e96/lib/ck/doc/ck_pr_fence_atomic_store
----------------------------------------------------------------------
diff --git a/lib/ck/doc/ck_pr_fence_atomic_store 
b/lib/ck/doc/ck_pr_fence_atomic_store
index a14867c..ad1735b 100644
--- a/lib/ck/doc/ck_pr_fence_atomic_store
+++ b/lib/ck/doc/ck_pr_fence_atomic_store
@@ -25,7 +25,7 @@
 .\"
 .\"
 .Dd May 16, 2013
-.Dt CK_PR_FENCE_ATOMIC_STORE 3 
+.Dt CK_PR_FENCE_ATOMIC_STORE 3
 .Sh NAME
 .Nm ck_pr_fence_atomic_store
 .Nd enforce ordering of atomic read-modify-write operations to store operations
@@ -38,9 +38,9 @@ Concurrency Kit (libck, \-lck)
 .Ft void
 .Fn ck_pr_fence_strict_atomic_store void
 .Sh DESCRIPTION
-The 
+The
 .Fn ck_pr_fence_atomic_store
-function enfores the ordering of any 
+function enfores the ordering of any
 atomic read-modify-write operations relative to
 any load operations following the function invocation. This function
 always serve as an implicit compiler barrier. On
@@ -94,7 +94,7 @@ This function has no return value.
 .Xr ck_pr_faa 3 ,
 .Xr ck_pr_inc 3 ,
 .Xr ck_pr_dec 3 ,
-.Xr ck_pr_neg 3 , 
+.Xr ck_pr_neg 3 ,
 .Xr ck_pr_not 3 ,
 .Xr ck_pr_add 3 ,
 .Xr ck_pr_sub 3 ,

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0da17e96/lib/ck/doc/ck_pr_fence_load
----------------------------------------------------------------------
diff --git a/lib/ck/doc/ck_pr_fence_load b/lib/ck/doc/ck_pr_fence_load
index da8e6d4..b6e778d 100644
--- a/lib/ck/doc/ck_pr_fence_load
+++ b/lib/ck/doc/ck_pr_fence_load
@@ -98,7 +98,7 @@ This function has no return value.
 .Xr ck_pr_faa 3 ,
 .Xr ck_pr_inc 3 ,
 .Xr ck_pr_dec 3 ,
-.Xr ck_pr_neg 3 , 
+.Xr ck_pr_neg 3 ,
 .Xr ck_pr_not 3 ,
 .Xr ck_pr_add 3 ,
 .Xr ck_pr_sub 3 ,

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0da17e96/lib/ck/doc/ck_pr_fence_load_atomic
----------------------------------------------------------------------
diff --git a/lib/ck/doc/ck_pr_fence_load_atomic 
b/lib/ck/doc/ck_pr_fence_load_atomic
index 774a263..c935491 100644
--- a/lib/ck/doc/ck_pr_fence_load_atomic
+++ b/lib/ck/doc/ck_pr_fence_load_atomic
@@ -98,7 +98,7 @@ This function has no return value.
 .Xr ck_pr_faa 3 ,
 .Xr ck_pr_inc 3 ,
 .Xr ck_pr_dec 3 ,
-.Xr ck_pr_neg 3 , 
+.Xr ck_pr_neg 3 ,
 .Xr ck_pr_not 3 ,
 .Xr ck_pr_add 3 ,
 .Xr ck_pr_sub 3 ,

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0da17e96/lib/ck/doc/ck_pr_fence_load_depends
----------------------------------------------------------------------
diff --git a/lib/ck/doc/ck_pr_fence_load_depends 
b/lib/ck/doc/ck_pr_fence_load_depends
index 38718ec..0c0ecfa 100644
--- a/lib/ck/doc/ck_pr_fence_load_depends
+++ b/lib/ck/doc/ck_pr_fence_load_depends
@@ -36,7 +36,7 @@ Concurrency Kit (libck, \-lck)
 .Ft void
 .Fn ck_pr_fence_load_depends void
 .Sh DESCRIPTION
-The 
+The
 .Fn ck_pr_fence_load_depends 3
 emits necessary fences for pure data-dependent loads. It currently only serves 
as a compiler
 barrier for Concurrency Kit's supported platforms. Unless you're on 
architecture
@@ -60,7 +60,7 @@ This function has no return value.
 .Xr ck_pr_faa 3 ,
 .Xr ck_pr_inc 3 ,
 .Xr ck_pr_dec 3 ,
-.Xr ck_pr_neg 3 , 
+.Xr ck_pr_neg 3 ,
 .Xr ck_pr_not 3 ,
 .Xr ck_pr_add 3 ,
 .Xr ck_pr_sub 3 ,

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0da17e96/lib/ck/doc/ck_pr_fence_load_store
----------------------------------------------------------------------
diff --git a/lib/ck/doc/ck_pr_fence_load_store 
b/lib/ck/doc/ck_pr_fence_load_store
index 378903e..4abce99 100644
--- a/lib/ck/doc/ck_pr_fence_load_store
+++ b/lib/ck/doc/ck_pr_fence_load_store
@@ -98,7 +98,7 @@ This function has no return value.
 .Xr ck_pr_faa 3 ,
 .Xr ck_pr_inc 3 ,
 .Xr ck_pr_dec 3 ,
-.Xr ck_pr_neg 3 , 
+.Xr ck_pr_neg 3 ,
 .Xr ck_pr_not 3 ,
 .Xr ck_pr_add 3 ,
 .Xr ck_pr_sub 3 ,

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0da17e96/lib/ck/doc/ck_pr_fence_memory
----------------------------------------------------------------------
diff --git a/lib/ck/doc/ck_pr_fence_memory b/lib/ck/doc/ck_pr_fence_memory
index f223527..0dfc81b 100644
--- a/lib/ck/doc/ck_pr_fence_memory
+++ b/lib/ck/doc/ck_pr_fence_memory
@@ -38,7 +38,7 @@ Concurrency Kit (libck, \-lck)
 .Ft void
 .Fn ck_pr_fence_strict_memory
 .Sh DESCRIPTION
-The 
+The
 .Fn ck_pr_fence_memory 3
 function enforces the ordering of any memory operations
 with respect to the invocation of the function. This function
@@ -98,7 +98,7 @@ This function has no return value.
 .Xr ck_pr_faa 3 ,
 .Xr ck_pr_inc 3 ,
 .Xr ck_pr_dec 3 ,
-.Xr ck_pr_neg 3 , 
+.Xr ck_pr_neg 3 ,
 .Xr ck_pr_not 3 ,
 .Xr ck_pr_add 3 ,
 .Xr ck_pr_sub 3 ,

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0da17e96/lib/ck/doc/ck_pr_fence_release
----------------------------------------------------------------------
diff --git a/lib/ck/doc/ck_pr_fence_release b/lib/ck/doc/ck_pr_fence_release
index 6794bbf..214917c 100644
--- a/lib/ck/doc/ck_pr_fence_release
+++ b/lib/ck/doc/ck_pr_fence_release
@@ -56,7 +56,7 @@ This function has no return value.
 .Xr ck_pr_faa 3 ,
 .Xr ck_pr_inc 3 ,
 .Xr ck_pr_dec 3 ,
-.Xr ck_pr_neg 3 , 
+.Xr ck_pr_neg 3 ,
 .Xr ck_pr_not 3 ,
 .Xr ck_pr_add 3 ,
 .Xr ck_pr_sub 3 ,

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0da17e96/lib/ck/doc/ck_pr_fence_store
----------------------------------------------------------------------
diff --git a/lib/ck/doc/ck_pr_fence_store b/lib/ck/doc/ck_pr_fence_store
index 5bb8f00..c5c5223 100644
--- a/lib/ck/doc/ck_pr_fence_store
+++ b/lib/ck/doc/ck_pr_fence_store
@@ -38,7 +38,7 @@ Concurrency Kit (libck, \-lck)
 .Ft void
 .Fn ck_pr_fence_strict_store void
 .Sh DESCRIPTION
-The 
+The
 .Fn ck_pr_fence_store
 function enfores the ordering of any memory store,
 .Fn ck_pr_store
@@ -97,7 +97,7 @@ This function has no return value.
 .Xr ck_pr_faa 3 ,
 .Xr ck_pr_inc 3 ,
 .Xr ck_pr_dec 3 ,
-.Xr ck_pr_neg 3 , 
+.Xr ck_pr_neg 3 ,
 .Xr ck_pr_not 3 ,
 .Xr ck_pr_add 3 ,
 .Xr ck_pr_sub 3 ,

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0da17e96/lib/ck/doc/ck_pr_fence_store_atomic
----------------------------------------------------------------------
diff --git a/lib/ck/doc/ck_pr_fence_store_atomic 
b/lib/ck/doc/ck_pr_fence_store_atomic
index a559f22..d53d2ae 100644
--- a/lib/ck/doc/ck_pr_fence_store_atomic
+++ b/lib/ck/doc/ck_pr_fence_store_atomic
@@ -38,13 +38,13 @@ Concurrency Kit (libck, \-lck)
 .Ft void
 .Fn ck_pr_fence_strict_store_atomic void
 .Sh DESCRIPTION
-The 
+The
 .Fn ck_pr_fence_store_atomic
 function enfores the ordering of any memory store,
 .Fn ck_pr_store
 and atomic read-modify-write operations to atomic read-modify-write
 operations relative to the invocation of the function. This function
-always serve as an implicit compiler barrier. 
+always serve as an implicit compiler barrier.
 This functions will emit a fence for PSO and RMO
 targets. In order to force the emission of a fence use the
 .Fn ck_pr_fence_strict_store_atomic
@@ -93,7 +93,7 @@ This function has no return value.
 .Xr ck_pr_faa 3 ,
 .Xr ck_pr_inc 3 ,
 .Xr ck_pr_dec 3 ,
-.Xr ck_pr_neg 3 , 
+.Xr ck_pr_neg 3 ,
 .Xr ck_pr_not 3 ,
 .Xr ck_pr_add 3 ,
 .Xr ck_pr_sub 3 ,

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0da17e96/lib/ck/doc/ck_pr_fence_store_load
----------------------------------------------------------------------
diff --git a/lib/ck/doc/ck_pr_fence_store_load 
b/lib/ck/doc/ck_pr_fence_store_load
index 40d1875..485bbcf 100644
--- a/lib/ck/doc/ck_pr_fence_store_load
+++ b/lib/ck/doc/ck_pr_fence_store_load
@@ -38,13 +38,13 @@ Concurrency Kit (libck, \-lck)
 .Ft void
 .Fn ck_pr_fence_strict_store_load void
 .Sh DESCRIPTION
-The 
+The
 .Fn ck_pr_fence_store_load
 function enfores the ordering of any memory store,
 .Fn ck_pr_store
 and atomic read-modify-write operations to load
 operations relative to the invocation of the function. This function
-always serve as an implicit compiler barrier. 
+always serve as an implicit compiler barrier.
 A fence will currently always be emitted for this
 operation, including for TSO memory model targets.
 .Sh EXAMPLE
@@ -92,7 +92,7 @@ This function has no return value.
 .Xr ck_pr_faa 3 ,
 .Xr ck_pr_inc 3 ,
 .Xr ck_pr_dec 3 ,
-.Xr ck_pr_neg 3 , 
+.Xr ck_pr_neg 3 ,
 .Xr ck_pr_not 3 ,
 .Xr ck_pr_add 3 ,
 .Xr ck_pr_sub 3 ,

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0da17e96/lib/ck/doc/ck_pr_inc
----------------------------------------------------------------------
diff --git a/lib/ck/doc/ck_pr_inc b/lib/ck/doc/ck_pr_inc
index 0b8f449..72a3e70 100644
--- a/lib/ck/doc/ck_pr_inc
+++ b/lib/ck/doc/ck_pr_inc
@@ -87,7 +87,7 @@ Concurrency Kit (libck, \-lck)
 .Ft void
 .Fn ck_pr_inc_8_zero "uint8_t *target" "bool *z"
 .Sh DESCRIPTION
-The 
+The
 .Fn ck_pr_inc 3
 family of functions atomically increment the value pointed to
 by
@@ -109,7 +109,7 @@ false otherwise.
 .Xr ck_pr_fas 3 ,
 .Xr ck_pr_faa 3 ,
 .Xr ck_pr_dec 3 ,
-.Xr ck_pr_neg 3 , 
+.Xr ck_pr_neg 3 ,
 .Xr ck_pr_not 3 ,
 .Xr ck_pr_add 3 ,
 .Xr ck_pr_sub 3 ,

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0da17e96/lib/ck/doc/ck_pr_load
----------------------------------------------------------------------
diff --git a/lib/ck/doc/ck_pr_load b/lib/ck/doc/ck_pr_load
index f0ab96d..ed615d3 100644
--- a/lib/ck/doc/ck_pr_load
+++ b/lib/ck/doc/ck_pr_load
@@ -60,7 +60,7 @@ Concurrency Kit (libck, \-lck)
 .Ft uint8_t
 .Fn ck_pr_load_8 "const uint8_t *target"
 .Sh DESCRIPTION
-The 
+The
 .Fn ck_pr_load 3
 family of functions atomically loads the value
 pointed to by
@@ -82,7 +82,7 @@ in the location pointed to by the first argument.
 .Xr ck_pr_faa 3 ,
 .Xr ck_pr_inc 3 ,
 .Xr ck_pr_dec 3 ,
-.Xr ck_pr_neg 3 , 
+.Xr ck_pr_neg 3 ,
 .Xr ck_pr_not 3 ,
 .Xr ck_pr_sub 3 ,
 .Xr ck_pr_and 3 ,

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0da17e96/lib/ck/doc/ck_pr_neg
----------------------------------------------------------------------
diff --git a/lib/ck/doc/ck_pr_neg b/lib/ck/doc/ck_pr_neg
index 6654856..38f9a0a 100644
--- a/lib/ck/doc/ck_pr_neg
+++ b/lib/ck/doc/ck_pr_neg
@@ -87,7 +87,7 @@ Concurrency Kit (libck, \-lck)
 .Ft void
 .Fn ck_pr_neg_8_zero "uint8_t *target" "bool *z"
 .Sh DESCRIPTION
-The 
+The
 .Fn ck_pr_neg 3
 family of functions atomically negate the value pointed to
 by
@@ -107,7 +107,7 @@ pointed to value to false otherwise.
 .Xr ck_pr_fas 3 ,
 .Xr ck_pr_faa 3 ,
 .Xr ck_pr_inc 3 ,
-.Xr ck_pr_dec 3 , 
+.Xr ck_pr_dec 3 ,
 .Xr ck_pr_not 3 ,
 .Xr ck_pr_add 3 ,
 .Xr ck_pr_sub 3 ,

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0da17e96/lib/ck/doc/ck_pr_not
----------------------------------------------------------------------
diff --git a/lib/ck/doc/ck_pr_not b/lib/ck/doc/ck_pr_not
index d6eb51c..b0a38b2 100644
--- a/lib/ck/doc/ck_pr_not
+++ b/lib/ck/doc/ck_pr_not
@@ -60,7 +60,7 @@ Concurrency Kit (libck, \-lck)
 .Ft void
 .Fn ck_pr_not_8 "uint8_t *target"
 .Sh DESCRIPTION
-The 
+The
 .Fn ck_pr_not 3
 family of functions atomically complement the value pointed to
 by
@@ -78,7 +78,7 @@ These functions have no return value.
 .Xr ck_pr_faa 3 ,
 .Xr ck_pr_inc 3 ,
 .Xr ck_pr_not 3 ,
-.Xr ck_pr_neg 3 , 
+.Xr ck_pr_neg 3 ,
 .Xr ck_pr_add 3 ,
 .Xr ck_pr_sub 3 ,
 .Xr ck_pr_and 3 ,

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0da17e96/lib/ck/doc/ck_pr_or
----------------------------------------------------------------------
diff --git a/lib/ck/doc/ck_pr_or b/lib/ck/doc/ck_pr_or
index 9ceddc5..2a68330 100644
--- a/lib/ck/doc/ck_pr_or
+++ b/lib/ck/doc/ck_pr_or
@@ -57,9 +57,9 @@ Concurrency Kit (libck, \-lck)
 .Ft void
 .Fn ck_pr_or_8 "uint8_t *target" "uint8_t delta"
 .Sh DESCRIPTION
-The 
+The
 .Fn ck_pr_or 3
-family of functions atomically compute and store the 
+family of functions atomically compute and store the
 result of a bitwise-or of the value pointed to by
 .Fa target
 and
@@ -79,7 +79,7 @@ This family of functions does not have a return value.
 .Xr ck_pr_faa 3 ,
 .Xr ck_pr_inc 3 ,
 .Xr ck_pr_dec 3 ,
-.Xr ck_pr_neg 3 , 
+.Xr ck_pr_neg 3 ,
 .Xr ck_pr_not 3 ,
 .Xr ck_pr_add 3 ,
 .Xr ck_pr_sub 3 ,

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0da17e96/lib/ck/doc/ck_pr_rtm
----------------------------------------------------------------------
diff --git a/lib/ck/doc/ck_pr_rtm b/lib/ck/doc/ck_pr_rtm
index a15aa91..53c31b6 100644
--- a/lib/ck/doc/ck_pr_rtm
+++ b/lib/ck/doc/ck_pr_rtm
@@ -98,7 +98,7 @@ set manuals.
 .Xr ck_pr_faa 3 ,
 .Xr ck_pr_inc 3 ,
 .Xr ck_pr_dec 3 ,
-.Xr ck_pr_neg 3 , 
+.Xr ck_pr_neg 3 ,
 .Xr ck_pr_not 3 ,
 .Xr ck_pr_sub 3 ,
 .Xr ck_pr_and 3 ,

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0da17e96/lib/ck/doc/ck_pr_stall
----------------------------------------------------------------------
diff --git a/lib/ck/doc/ck_pr_stall b/lib/ck/doc/ck_pr_stall
index 762a739..bc46647 100644
--- a/lib/ck/doc/ck_pr_stall
+++ b/lib/ck/doc/ck_pr_stall
@@ -36,9 +36,9 @@ Concurrency Kit (libck, \-lck)
 .Ft void
 .Fn ck_pr_stall void
 .Sh DESCRIPTION
-The 
+The
 .Fn ck_pr_stall 3
-function should be used inside retry paths of busy-wait loops. 
+function should be used inside retry paths of busy-wait loops.
 It not only serves as a compiler barrier, but on some architectures
 it emits cycle-saving instructions.
 .Sh EXAMPLE
@@ -71,7 +71,7 @@ function(void)
 .Xr ck_pr_faa 3 ,
 .Xr ck_pr_inc 3 ,
 .Xr ck_pr_dec 3 ,
-.Xr ck_pr_neg 3 , 
+.Xr ck_pr_neg 3 ,
 .Xr ck_pr_not 3 ,
 .Xr ck_pr_add 3 ,
 .Xr ck_pr_sub 3 ,

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0da17e96/lib/ck/doc/ck_pr_store
----------------------------------------------------------------------
diff --git a/lib/ck/doc/ck_pr_store b/lib/ck/doc/ck_pr_store
index 5cc7053..462cf7b 100644
--- a/lib/ck/doc/ck_pr_store
+++ b/lib/ck/doc/ck_pr_store
@@ -60,7 +60,7 @@ Concurrency Kit (libck, \-lck)
 .Ft void
 .Fn ck_pr_store_8 "uint8_t *target" "uint8_t value"
 .Sh DESCRIPTION
-The 
+The
 .Fn ck_pr_store 3
 family of functions atomically stores the value specified
 by
@@ -82,7 +82,7 @@ This family of functions has no return value.
 .Xr ck_pr_faa 3 ,
 .Xr ck_pr_inc 3 ,
 .Xr ck_pr_dec 3 ,
-.Xr ck_pr_neg 3 , 
+.Xr ck_pr_neg 3 ,
 .Xr ck_pr_not 3 ,
 .Xr ck_pr_sub 3 ,
 .Xr ck_pr_and 3 ,

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0da17e96/lib/ck/doc/ck_pr_sub
----------------------------------------------------------------------
diff --git a/lib/ck/doc/ck_pr_sub b/lib/ck/doc/ck_pr_sub
index 697ea1b..5eee170 100644
--- a/lib/ck/doc/ck_pr_sub
+++ b/lib/ck/doc/ck_pr_sub
@@ -60,7 +60,7 @@ Concurrency Kit (libck, \-lck)
 .Ft void
 .Fn ck_pr_sub_8 "uint8_t *target" "uint8_t delta"
 .Sh DESCRIPTION
-The 
+The
 .Fn ck_pr_sub 3
 family of functions atomically subtract the value specified by
 .Fa delta
@@ -79,7 +79,7 @@ This family of functions does not have a return value.
 .Xr ck_pr_faa 3 ,
 .Xr ck_pr_inc 3 ,
 .Xr ck_pr_dec 3 ,
-.Xr ck_pr_neg 3 , 
+.Xr ck_pr_neg 3 ,
 .Xr ck_pr_not 3 ,
 .Xr ck_pr_add 3 ,
 .Xr ck_pr_and 3 ,

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0da17e96/lib/ck/doc/ck_pr_xor
----------------------------------------------------------------------
diff --git a/lib/ck/doc/ck_pr_xor b/lib/ck/doc/ck_pr_xor
index cda38cb..509f60d 100644
--- a/lib/ck/doc/ck_pr_xor
+++ b/lib/ck/doc/ck_pr_xor
@@ -57,9 +57,9 @@ Concurrency Kit (libck, \-lck)
 .Ft void
 .Fn ck_pr_xor_8 "uint8_t *target" "uint8_t delta"
 .Sh DESCRIPTION
-The 
+The
 .Fn ck_pr_xor 3
-family of functions atomically compute and store the 
+family of functions atomically compute and store the
 result of a bitwise-xor of the value pointed to by
 .Fa target
 and
@@ -79,7 +79,7 @@ This family of functions does not have a return value.
 .Xr ck_pr_faa 3 ,
 .Xr ck_pr_inc 3 ,
 .Xr ck_pr_dec 3 ,
-.Xr ck_pr_neg 3 , 
+.Xr ck_pr_neg 3 ,
 .Xr ck_pr_not 3 ,
 .Xr ck_pr_add 3 ,
 .Xr ck_pr_sub 3 ,

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0da17e96/lib/ck/doc/ck_rhs_apply
----------------------------------------------------------------------
diff --git a/lib/ck/doc/ck_rhs_apply b/lib/ck/doc/ck_rhs_apply
new file mode 100644
index 0000000..80b1da7
--- /dev/null
+++ b/lib/ck/doc/ck_rhs_apply
@@ -0,0 +1,86 @@
+.\"
+.\" Copyright 2014 Samy Al Bahra.
+.\" Copyright 2014 Backtrace I/O, Inc.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\"
+.Dd September 1, 2014
+.Dt CK_RHS_APPLY 3
+.Sh NAME
+.Nm ck_rhs_apply
+.Nd apply a function to hash set value
+.Sh LIBRARY
+Concurrency Kit (libck, \-lck)
+.Sh SYNOPSIS
+.In ck_rhs.h
+.Ft void *
+.Fn ck_rhs_apply_fn_t "void *key" "void *closure"
+.Ft bool
+.Fn ck_rhs_apply "ck_rhs_t *hs" "unsigned long hash" "const void *key" 
"ck_rhs_apply_fn_t *function" "void *argument"
+.Sh DESCRIPTION
+The
+.Fn ck_rhs_apply 3
+function will lookup the hash set slot associated with
+.Fa key
+and pass it to function pointed to by
+.Fa function
+for further action. This callback may remove or replace
+the value by respectively returning NULL or a pointer to
+another object with an identical key. The first argument
+passed to
+.Fa function
+is a pointer to the object found in the hash set and
+the second argument is the
+.Fa argument
+pointer passed to
+.Fn ck_rhs_apply 3 .
+If the pointer returned by
+.Fa function
+is equivalent to the first argument then no modification
+is made to the hash set.
+.Sh RETURN VALUES
+Upon successful completion,
+.Fn ck_rhs_apply 3
+returns true and otherwise returns false on failure.
+.Sh SEE ALSO
+.Xr ck_rhs_init 3 ,
+.Xr ck_rhs_move 3 ,
+.Xr ck_rhs_destroy 3 ,
+.Xr ck_rhs_fas 3 ,
+.Xr CK_RHS_HASH 3 ,
+.Xr ck_rhs_iterator_init 3 ,
+.Xr ck_rhs_next 3 ,
+.Xr ck_rhs_get 3 ,
+.Xr ck_rhs_put 3 ,
+.Xr ck_rhs_put_unique 3 ,
+.Xr ck_rhs_remove 3 ,
+.Xr ck_rhs_grow 3 ,
+.Xr ck_rhs_rebuild 3 ,
+.Xr ck_rhs_gc 3 ,
+.Xr ck_rhs_count 3 ,
+.Xr ck_rhs_reset 3 ,
+.Xr ck_rhs_reset_size 3 ,
+.Xr ck_rhs_stat 3
+.Pp
+Additional information available at http://concurrencykit.org/

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0da17e96/lib/ck/doc/ck_rhs_count
----------------------------------------------------------------------
diff --git a/lib/ck/doc/ck_rhs_count b/lib/ck/doc/ck_rhs_count
new file mode 100644
index 0000000..3a42b12
--- /dev/null
+++ b/lib/ck/doc/ck_rhs_count
@@ -0,0 +1,70 @@
+.\"
+.\" Copyright 2012-2013 Samy Al Bahra.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\"
+.Dd September 17, 2012
+.Dt CK_RHS_COUNT 3
+.Sh NAME
+.Nm ck_rhs_count
+.Nd returns number of entries in hash set
+.Sh LIBRARY
+Concurrency Kit (libck, \-lck)
+.Sh SYNOPSIS
+.In ck_rhs.h
+.Ft unsigned long
+.Fn ck_rhs_count "ck_rhs_t *hs"
+.Sh DESCRIPTION
+The
+.Fn ck_rhs_count 3
+function returns the number of keys currently
+stored in
+.Fa hs .
+.Sh ERRORS
+Behavior is undefined if
+.Fa hs
+is uninitialized. Behavior is
+undefined if this function is called by a non-writer
+thread.
+.Sh SEE ALSO
+.Xr ck_rhs_init 3 ,
+.Xr ck_rhs_move 3 ,
+.Xr ck_rhs_destroy 3 ,
+.Xr CK_RHS_HASH 3 ,
+.Xr ck_rhs_iterator_init 3 ,
+.Xr ck_rhs_next 3 ,
+.Xr ck_rhs_get 3 ,
+.Xr ck_rhs_put 3 ,
+.Xr ck_rhs_put_unique 3 ,
+.Xr ck_rhs_set 3 ,
+.Xr ck_rhs_fas 3 ,
+.Xr ck_rhs_remove 3 ,
+.Xr ck_rhs_grow 3 ,
+.Xr ck_rhs_rebuild 3 ,
+.Xr ck_rhs_gc 3 ,
+.Xr ck_rhs_reset 3 ,
+.Xr ck_rhs_reset_size 3 ,
+.Xr ck_rhs_stat 3
+.Pp
+Additional information available at http://concurrencykit.org/

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0da17e96/lib/ck/doc/ck_rhs_destroy
----------------------------------------------------------------------
diff --git a/lib/ck/doc/ck_rhs_destroy b/lib/ck/doc/ck_rhs_destroy
new file mode 100644
index 0000000..68de27e
--- /dev/null
+++ b/lib/ck/doc/ck_rhs_destroy
@@ -0,0 +1,77 @@
+.\"
+.\" Copyright 2012-2013 Samy Al Bahra.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\"
+.Dd September 17, 2012
+.Dt CK_RHS_DESTROY 3
+.Sh NAME
+.Nm ck_rhs_destroy
+.Nd destroy hash set
+.Sh LIBRARY
+Concurrency Kit (libck, \-lck)
+.Sh SYNOPSIS
+.In ck_rhs.h
+.Ft void
+.Fn ck_rhs_destroy "ck_rhs_t *hs"
+.Sh DESCRIPTION
+The
+.Fn ck_rhs_destroy 3
+function will request that the underlying allocator, as specified by the
+.Xr ck_rhs_init 3
+function, immediately destroy the object pointed to by the
+.Fa hs
+argument.
+The user must guarantee that no threads are accessing the object pointed to
+by
+.Fa hs
+when
+.Fn ck_rhs_destroy 3
+is called.
+.Sh RETURN VALUES
+.Fn ck_rhs_destroy 3
+has no return value.
+.Sh ERRORS
+This function is guaranteed not to fail.
+.Sh SEE ALSO
+.Xr ck_rhs_init 3 ,
+.Xr ck_rhs_move 3 ,
+.Xr CK_RHS_HASH 3 ,
+.Xr ck_rhs_iterator_init 3 ,
+.Xr ck_rhs_next 3 ,
+.Xr ck_rhs_get 3 ,
+.Xr ck_rhs_put 3 ,
+.Xr ck_rhs_put_unique 3 ,
+.Xr ck_rhs_set 3 ,
+.Xr ck_rhs_fas 3 ,
+.Xr ck_rhs_remove 3 ,
+.Xr ck_rhs_grow 3 ,
+.Xr ck_rhs_rebuild 3 ,
+.Xr ck_rhs_gc 3 ,
+.Xr ck_rhs_count 3 ,
+.Xr ck_rhs_reset 3 ,
+.Xr ck_rhs_reset_size 3 ,
+.Xr ck_rhs_stat 3
+.Pp
+Additional information available at http://concurrencykit.org/

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0da17e96/lib/ck/doc/ck_rhs_fas
----------------------------------------------------------------------
diff --git a/lib/ck/doc/ck_rhs_fas b/lib/ck/doc/ck_rhs_fas
new file mode 100644
index 0000000..453c40b
--- /dev/null
+++ b/lib/ck/doc/ck_rhs_fas
@@ -0,0 +1,98 @@
+.\"
+.\" Copyright 2013 Samy Al Bahra.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\"
+.Dd June 20, 2013
+.Dt CK_RHS_FAS 3
+.Sh NAME
+.Nm ck_rhs_fas
+.Nd fetch and store key in hash set
+.Sh LIBRARY
+Concurrency Kit (libck, \-lck)
+.Sh SYNOPSIS
+.In ck_rhs.h
+.Ft bool
+.Fn ck_rhs_fas "ck_rhs_t *hs" "unsigned long hash" "const void *key" "void 
**previous"
+.Sh DESCRIPTION
+The
+.Fn ck_rhs_fas 3
+function will fetch and store the key specified by the
+.Fa key
+argument in the hash set pointed to by the
+.Fa hs
+argument. The key specified by
+.Fa key
+is expected to have the hash value specified by the
+.Fa hash
+argument (which was previously generated using the
+.Xr CK_RHS_HASH 3
+macro).
+.Pp
+If the call to
+.Fn ck_rhs_fas 3
+was successful then the key specified by
+.Fa key
+was successfully stored in the hash set pointed to by
+.Fa hs .
+The key must already exist in the hash set, and is
+replaced by
+.Fa key
+and the previous value is stored into the void pointer
+pointed to by the
+.Fa previous
+argument. If the key does not exist in the hash set
+then the function will return false and the hash set
+is unchanged. This function
+is guaranteed to be stable with respect to memory usage.
+.Sh RETURN VALUES
+Upon successful completion,
+.Fn ck_rhs_fas 3
+returns true and otherwise returns false on failure.
+.Sh ERRORS
+Behavior is undefined if
+.Fa key
+or
+.Fa hs
+are uninitialized.
+.Sh SEE ALSO
+.Xr ck_rhs_init 3 ,
+.Xr ck_rhs_move 3 ,
+.Xr ck_rhs_destroy 3 ,
+.Xr CK_RHS_HASH 3 ,
+.Xr ck_rhs_iterator_init 3 ,
+.Xr ck_rhs_next 3 ,
+.Xr ck_rhs_get 3 ,
+.Xr ck_rhs_put 3 ,
+.Xr ck_rhs_put_unique 3 ,
+.Xr ck_rhs_remove 3 ,
+.Xr ck_rhs_grow 3 ,
+.Xr ck_rhs_rebuild 3 ,
+.Xr ck_rhs_gc 3 ,
+.Xr ck_rhs_count 3 ,
+.Xr ck_rhs_reset 3 ,
+.Xr ck_rhs_reset_size 3 ,
+.Xr ck_rhs_stat 3
+.Pp
+Additional information available at http://concurrencykit.org/

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0da17e96/lib/ck/doc/ck_rhs_gc
----------------------------------------------------------------------
diff --git a/lib/ck/doc/ck_rhs_gc b/lib/ck/doc/ck_rhs_gc
new file mode 100644
index 0000000..0ad5324
--- /dev/null
+++ b/lib/ck/doc/ck_rhs_gc
@@ -0,0 +1,73 @@
+.\"
+.\" Copyright 2013 Samy Al Bahra.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\"
+.Dd December 17, 2013
+.Dt CK_RHS_GC 3
+.Sh NAME
+.Nm ck_rhs_gc
+.Nd perform maintenance on a hash set
+.Sh LIBRARY
+Concurrency Kit (libck, \-lck)
+.Sh SYNOPSIS
+.In ck_rhs.h
+.Ft bool
+.Fn ck_rhs_gc "ck_rhs_t *hs"
+.Sh DESCRIPTION
+The
+.Fn ck_rhs_gc 3
+function will perform various maintenance routines on the hash set
+pointed to by
+.Fa hs ,
+including recalculating the maximum number of probes.
+.Sh RETURN VALUES
+Upon successful completion,
+.Fn ck_rhs_gc 3
+returns true and otherwise returns false on failure due to memory allocation
+failure.
+.Sh ERRORS
+This function will only return false if there are internal memory allocation
+failures.
+.Sh SEE ALSO
+.Xr ck_rhs_init 3 ,
+.Xr ck_rhs_move 3 ,
+.Xr ck_rhs_destroy 3 ,
+.Xr CK_RHS_HASH 3 ,
+.Xr ck_rhs_iterator_init 3 ,
+.Xr ck_rhs_next 3 ,
+.Xr ck_rhs_get 3 ,
+.Xr ck_rhs_put 3 ,
+.Xr ck_rhs_put_unique 3 ,
+.Xr ck_rhs_grow 3 ,
+.Xr ck_rhs_rebuild 3 ,
+.Xr ck_rhs_set 3 ,
+.Xr ck_rhs_fas 3 ,
+.Xr ck_rhs_remove 3 ,
+.Xr ck_rhs_count 3 ,
+.Xr ck_rhs_reset 3 ,
+.Xr ck_rhs_reset_size 3 ,
+.Xr ck_rhs_stat 3
+.Pp
+Additional information available at http://concurrencykit.org/

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0da17e96/lib/ck/doc/ck_rhs_get
----------------------------------------------------------------------
diff --git a/lib/ck/doc/ck_rhs_get b/lib/ck/doc/ck_rhs_get
new file mode 100644
index 0000000..51c6e2f
--- /dev/null
+++ b/lib/ck/doc/ck_rhs_get
@@ -0,0 +1,88 @@
+.\"
+.\" Copyright 2012-2013 Samy Al Bahra.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\"
+.Dd September 17, 2012
+.Dt CK_RHS_GET 3
+.Sh NAME
+.Nm ck_rhs_get
+.Nd load a key from a hash set
+.Sh LIBRARY
+Concurrency Kit (libck, \-lck)
+.Sh SYNOPSIS
+.In ck_rhs.h
+.Ft void *
+.Fn ck_rhs_get "ck_rhs_t *hs" "unsigned long hash" "const void *key"
+.Sh DESCRIPTION
+The
+.Fn ck_rhs_get 3
+function will return a pointer to a key in the hash set
+.Fa hs
+that is of equivalent value to the object pointed to by
+.Fa key .
+The key specified by
+.Fa key
+is expected to have the hash value specified by the
+.Fa hash
+argument (which is to have been previously generated using the
+.Xr CK_RHS_HASH 3
+macro).
+.Sh RETURN VALUES
+If the provided key is a member of
+.Fa hs
+then a pointer to the key as stored in
+.Fa hs
+is returned. If the key was not found in
+.Fa hs
+then a value of
+.Dv NULL
+is returned.
+.Sh ERRORS
+Behavior is undefined if
+.Fa entry
+or
+.Fa hs
+are uninitialized.
+.Sh SEE ALSO
+.Xr ck_rhs_init 3 ,
+.Xr ck_rhs_move 3 ,
+.Xr ck_rhs_destroy 3 ,
+.Xr CK_RHS_HASH 3 ,
+.Xr ck_rhs_iterator_init 3 ,
+.Xr ck_rhs_next 3 ,
+.Xr ck_rhs_put 3 ,
+.Xr ck_rhs_put_unique 3 ,
+.Xr ck_rhs_set 3 ,
+.Xr ck_rhs_fas 3 ,
+.Xr ck_rhs_remove 3 ,
+.Xr ck_rhs_grow 3 ,
+.Xr ck_rhs_rebuild 3 ,
+.Xr ck_rhs_gc 3 ,
+.Xr ck_rhs_count 3 ,
+.Xr ck_rhs_reset 3 ,
+.Xr ck_rhs_reset_size 3 ,
+.Xr ck_rhs_stat 3
+.Pp
+Additional information available at http://concurrencykit.org/

Reply via email to