http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f098175e/lib/ck/doc/CK_COHORT_UNLOCK ---------------------------------------------------------------------- diff --git a/lib/ck/doc/CK_COHORT_UNLOCK b/lib/ck/doc/CK_COHORT_UNLOCK new file mode 100644 index 0000000..6c5440a --- /dev/null +++ b/lib/ck/doc/CK_COHORT_UNLOCK @@ -0,0 +1,61 @@ +.\" +.\" Copyright 2013 Brendon Scheinman. +.\" 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 February 24, 2013. +.Dt CK_COHORT_UNLOCK 3 +.Sh NAME +.Nm CK_COHORT_UNLOCK +.Nd release cohort lock +.Sh LIBRARY +Concurrency Kit (libck, \-lck) +.Sh SYNOPSIS +.In ck_cohort.h +.Fn CK_COHORT_UNLOCK "COHORT_NAME cohort_name" "COHORT *cohort" "void *global_context" \ +"void *local_context" +.Sh DESCRIPTION +This call instructs +.Fa cohort +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 +.Fa global_lock_method +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 +. +.Sh SEE ALSO +.Xr ck_cohort 3 , +.Xr CK_COHORT_PROTOTYPE 3 , +.Xr CK_COHORT_TRYLOCK_PROTOTYPE 3 , +.Xr CK_COHORT_INSTANCE 3 , +.Xr CK_COHORT_INITIALIZER 3 , +.Xr CK_COHORT_INIT 3 , +.Xr CK_COHORT_LOCK 3 , +.Xr CK_COHORT_LOCKED 3 , +.Xr CK_COHORT_TRYLOCK 3 , +.Pp +Additional information available at http://concurrencykit.org/
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f098175e/lib/ck/doc/CK_HS_HASH ---------------------------------------------------------------------- diff --git a/lib/ck/doc/CK_HS_HASH b/lib/ck/doc/CK_HS_HASH new file mode 100644 index 0000000..6d8dc75 --- /dev/null +++ b/lib/ck/doc/CK_HS_HASH @@ -0,0 +1,71 @@ +.\" +.\" 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 March 28, 2012 +.Dt CK_HS_HASH 3 +.Sh NAME +.Nm CK_HS_HASH +.Nd invoke hash function with hash set seed +.Sh LIBRARY +Concurrency Kit (libck, \-lck) +.Sh SYNOPSIS +.In ck_hs.h +.Ft unsigned long +.Fn CK_HS_HASH "ck_hs_t *hs" "ck_hs_hash_cb_t *hf" "const void *key" +.Sh DESCRIPTION +The +.Fn CK_HS_HASH 3 +macro will invoke the hash function pointed to by the +.Fa hf +argument with the seed value associated with +.Fa hs +and the key pointer specified by the +.Fa key +argument. +.Sh RETURN VALUES +This function will return the value returned by the +.Fa hf +function. +.Sh ERRORS +It is expected +.Fa hs +was previously initialized via +.Fn ck_hs_init 3 . +.Sh SEE ALSO +.Xr ck_hs_init 3 , +.Xr ck_hs_destroy 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_set 3 , +.Xr ck_hs_remove 3 , +.Xr ck_hs_grow 3 , +.Xr ck_hs_count 3 , +.Xr ck_hs_reset 3 , +.Xr ck_hs_stat 3 +.Pp +Additional information available at http://concurrencykit.org/ http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f098175e/lib/ck/doc/CK_RWCOHORT_INIT ---------------------------------------------------------------------- diff --git a/lib/ck/doc/CK_RWCOHORT_INIT b/lib/ck/doc/CK_RWCOHORT_INIT new file mode 100644 index 0000000..e097039 --- /dev/null +++ b/lib/ck/doc/CK_RWCOHORT_INIT @@ -0,0 +1,61 @@ +.\" +.\" Copyright 2013 Brendon Scheinman. +.\" 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 February 24, 2013. +.Dt CK_RWCOHORT_INIT 3 +.Sh NAME +.Nm CK_RWCOHORT_INIT +.Nd initialize instance of a cohort-based reader-writer lock type +.Sh LIBRARY +Concurrency Kit (libck, \-lck) +.Sh SYNOPSIS +.In ck_rwcohort.h +.Fn CK_RWCOHORT_NEUTRAL_INIT "COHORT_NAME cohort_name" "LOCK *lock" +.Fn CK_RWCOHORT_RP_INIT "COHORT_NAME cohort_name" "LOCK *lock" "unsigned int wait_limit" +.Fn CK_RWCOHORT_WP_INIT "COHORT_NAME cohort_name" "LOCK *lock" "unsigned int wait_limit" +.Sh DESCRIPTION +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 +.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 +.Fa wait_limit +argument, you should use CK_RWCOHORT_STRATEGY_DEFAULT_LOCAL_WAIT_LIMIT. +.Sh SEE ALSO +.Xr ck_rwcohort 3 , +.Xr CK_RWCOHORT_PROTOTYPE 3 , +.Xr CK_RWCOHORT_TRYLOCK_PROTOTYPE 3 , +.Xr CK_RWCOHORT_INSTANCE 3 , +.Xr CK_RWCOHORT_INITIALIZER 3 , +.Xr CK_RWCOHORT_LOCK 3 , +.Xr CK_RWCOHORT_UNLOCK 3 , +.Xr CK_RWCOHORT_LOCKED 3 , +.Xr CK_RWCOHORT_TRYLOCK 3 , +.Pp +Additional information available at http://concurrencykit.org/ http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f098175e/lib/ck/doc/CK_RWCOHORT_INSTANCE ---------------------------------------------------------------------- diff --git a/lib/ck/doc/CK_RWCOHORT_INSTANCE b/lib/ck/doc/CK_RWCOHORT_INSTANCE new file mode 100644 index 0000000..fcdfeea --- /dev/null +++ b/lib/ck/doc/CK_RWCOHORT_INSTANCE @@ -0,0 +1,64 @@ +.\" +.\" Copyright 2013 Brendon Scheinman. +.\" 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 February 24, 2013. +.Dt CK_RWCOHORT_INSTANCE 3 +.Sh NAME +.Nm CK_RWCOHORT_INSTANCE +.Nd declare an instance of a cohort-based reader-writer lock type +.Sh LIBRARY +Concurrency Kit (libck, \-lck) +.Sh SYNOPSIS +.In ck_cohort.h +.Fn CK_RWCOHORT_NEUTRAL_INSTANCE "COHORT_NAME cohort_name" +.Fn CK_RWCOHORT_RP_INSTANCE "COHORT_NAME cohort_name" +.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 +.Xr CK_RWCOHORT_PROTOTYPE 3 +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 +CK_RWCOHORT_INSTANCE(foo) cohort; +.Pp +This macro should also be used when allocating memory for cohorts. For instance, +to allocate a block of 4 cohorts: +.br +CK_RWCOHORT_WP_INSTANCE(foo) *cohorts = malloc(4 * sizeof(CK_RWCOHORT_WP_INSTANCE(foo))); +.Sh SEE ALSO +.Xr ck_rwcohort 3 , +.Xr CK_RWCOHORT_PROTOTYPE 3 , +.Xr CK_RWCOHORT_TRYLOCK_PROTOTYPE 3 , +.Xr CK_RWCOHORT_INSTANCE 3 , +.Xr CK_RWCOHORT_INITIALIZER 3 , +.Xr CK_RWCOHORT_LOCK 3 , +.Xr CK_RWCOHORT_UNLOCK 3 , +.Xr CK_RWCOHORT_LOCKED 3 , +.Xr CK_RWCOHORT_TRYLOCK 3 , +.Pp +Additional information available at http://concurrencykit.org/ http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f098175e/lib/ck/doc/CK_RWCOHORT_PROTOTYPE ---------------------------------------------------------------------- diff --git a/lib/ck/doc/CK_RWCOHORT_PROTOTYPE b/lib/ck/doc/CK_RWCOHORT_PROTOTYPE new file mode 100644 index 0000000..fb4d25a --- /dev/null +++ b/lib/ck/doc/CK_RWCOHORT_PROTOTYPE @@ -0,0 +1,65 @@ +.\" +.\" Copyright 2013 Brendon Scheinman. +.\" 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 February 24, 2013. +.Dt CK_RWCOHORT_PROTOTYPE 3 +.Sh NAME +.Nm CK_RWCOHORT_PROTOTYPE +.Nd define reader-writer cohort-based lock using the specified cohort type +.Sh LIBRARY +Concurrency Kit (libck, \-lck) +.Sh SYNOPSIS +.In ck_rwcohort.h +.Fn CK_RWCOHORT_NEUTRAL_PROTOTYPE "COHORT_NAME cohort_name" +.Fn CK_RWCOHORT_RP_PROTOTYPE "COHORT_NAME cohort_name" +.Fn CK_RWCOHORT_WP_PROTOTYPE "COHORT_NAME cohort_name" +.Sh DESCRIPTION +The ck_rwcohort.h header file does not define any cohort types. Instead, the user must use +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 +.Xr CK_COHORT_PROTOTYPE 3 +or +.Xr CK_COHORT_TRYLOCK_PROTOTYPE 3 +macros. +.Pp +Instances of the defined lock type can be declared as: +.br + CK_RWCOHORT_INSTANCE(cohort_name) lock; +.Sh SEE ALSO +.Xr ck_rwcohort 3 , +.Xr CK_COHORT_PROTOTYPE 3 , +.Xr CK_COHORT_TRYLOCK_PROTOTYPE 3 , +.Xr CK_RWCOHORT_INSTANCE 3 , +.Xr CK_RWCOHORT_INITIALIZER 3 , +.Xr CK_RWCOHORT_INIT 3 , +.Xr CK_RWCOHORT_READ_LOCK 3 , +.Xr CK_RWCOHORT_READ_UNLOCK 3 , +.Xr CK_RWCOHORT_WRITE_LOCK 3 , +.Xr CK_RWCOHORT_WRITE_UNLOCK 3 , +.Pp +Additional information available at http://concurrencykit.org/ http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f098175e/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 new file mode 100644 index 0000000..bf65853 --- /dev/null +++ b/lib/ck/doc/CK_RWCOHORT_READ_LOCK @@ -0,0 +1,66 @@ +.\" +.\" Copyright 2013 Brendon Scheinman. +.\" 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 February 24, 2013. +.Dt CK_RWCOHORT_READ_LOCK 3 +.Sh NAME +.Nm CK_RWCOHORT_READ_LOCK +.Nd acquire read-only permission for cohort-based reader-writer lock +.Sh LIBRARY +Concurrency Kit (libck, \-lck) +.Sh SYNOPSIS +.In ck_cohort.h +.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"\ +"void *global_context" "void *local_context" +.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 +.Fa lock . +The +.Fa global_context +and +.Fa local_context +arguments will be passed along as the context arguments to any calls to +.Fa cohort . +. +.Sh SEE ALSO +.Xr ck_cohort 3 , +.Xr CK_RWCOHORT_PROTOTYPE 3 , +.Xr CK_RWCOHORT_INSTANCE 3 , +.Xr CK_RWCOHORT_INITIALIZER 3 , +.Xr CK_RWCOHORT_INIT 3 , +.Xr CK_RWCOHORT_READ_UNLOCK 3 , +.Xr CK_RWCOHORT_WRITE_LOCK 3 , +.Xr CK_RWCOHORT_WRITE_UNLOCK 3 , +.Pp +Additional information available at http://concurrencykit.org/ http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f098175e/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 new file mode 100644 index 0000000..4dd26e1 --- /dev/null +++ b/lib/ck/doc/CK_RWCOHORT_READ_UNLOCK @@ -0,0 +1,65 @@ +.\" +.\" Copyright 2013 Brendon Scheinman. +.\" 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 February 24, 2013. +.Dt CK_RWCOHORT_READ_UNLOCK 3 +.Sh NAME +.Nm CK_RWCOHORT_READ_UNLOCK +.Nd relinquish read-only access to cohort-based reader-writer lock +.Sh LIBRARY +Concurrency Kit (libck, \-lck) +.Sh SYNOPSIS +.In ck_cohort.h +.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"\ +"void *global_context" "void *local_context" +.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 lock . +The +.Fa global_context +and +.Fa local_context +arguments will be passed along as the context arguments to any calls to +.Fa cohort . +. +.Sh SEE ALSO +.Xr ck_cohort 3 , +.Xr CK_RWCOHORT_PROTOTYPE 3 , +.Xr CK_RWCOHORT_INSTANCE 3 , +.Xr CK_RWCOHORT_INITIALIZER 3 , +.Xr CK_RWCOHORT_INIT 3 , +.Xr CK_RWCOHORT_READ_LOCK 3 , +.Xr CK_RWCOHORT_WRITE_LOCK 3 , +.Xr CK_RWCOHORT_WRITE_UNLOCK 3 , +.Pp +Additional information available at http://concurrencykit.org/ http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f098175e/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 new file mode 100644 index 0000000..0977cb7 --- /dev/null +++ b/lib/ck/doc/CK_RWCOHORT_WRITE_LOCK @@ -0,0 +1,66 @@ +.\" +.\" Copyright 2013 Brendon Scheinman. +.\" 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 February 24, 2013. +.Dt CK_RWCOHORT_WRITE_LOCK 3 +.Sh NAME +.Nm CK_RWCOHORT_WRITE_LOCK +.Nd acquite write access for a cohort-based reader-writer lock +.Sh LIBRARY +Concurrency Kit (libck, \-lck) +.Sh SYNOPSIS +.In ck_cohort.h +.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"\ +"void *global_context" "void *local_context" +.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 +.Fa lock . +The +.Fa global_context +and +.Fa local_context +arguments will be passed along as the context arguments to any calls to +.Fa cohort . +. +.Sh SEE ALSO +.Xr ck_cohort 3 , +.Xr CK_RWCOHORT_PROTOTYPE 3 , +.Xr CK_RWCOHORT_INSTANCE 3 , +.Xr CK_RWCOHORT_INITIALIZER 3 , +.Xr CK_RWCOHORT_INIT 3 , +.Xr CK_RWCOHORT_READ_LOCK 3 , +.Xr CK_RWCOHORT_READ_UNLOCK 3 , +.Xr CK_RWCOHORT_WRITE_UNLOCK 3 , +.Pp +Additional information available at http://concurrencykit.org/ http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f098175e/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 new file mode 100644 index 0000000..c3537bf --- /dev/null +++ b/lib/ck/doc/CK_RWCOHORT_WRITE_UNLOCK @@ -0,0 +1,65 @@ +.\" +.\" Copyright 2013 Brendon Scheinman. +.\" 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 February 24, 2013. +.Dt CK_RWCOHORT_WRITE_UNLOCK 3 +.Sh NAME +.Nm CK_RWCOHORT_WRITE_UNLOCK +.Nd relinquish write access for cohort-based reader-writer lock +.Sh LIBRARY +Concurrency Kit (libck, \-lck) +.Sh SYNOPSIS +.In ck_cohort.h +.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"\ +"void *global_context" "void *local_context" +.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 lock . +The +.Fa global_context +and +.Fa local_context +arguments will be passed along as the context arguments to any calls to +.Fa cohort . +. +.Sh SEE ALSO +.Xr ck_cohort 3 , +.Xr CK_RWCOHORT_PROTOTYPE 3 , +.Xr CK_RWCOHORT_INSTANCE 3 , +.Xr CK_RWCOHORT_INITIALIZER 3 , +.Xr CK_RWCOHORT_INIT 3 , +.Xr CK_RWCOHORT_READ_LOCK 3 , +.Xr CK_RWCOHORT_READ_UNLOCK 3 , +.Xr CK_RWCOHORT_WRITE_LOCK 3 , +.Pp +Additional information available at http://concurrencykit.org/ http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f098175e/lib/ck/doc/Makefile.in ---------------------------------------------------------------------- diff --git a/lib/ck/doc/Makefile.in b/lib/ck/doc/Makefile.in new file mode 100644 index 0000000..ff24a91 --- /dev/null +++ b/lib/ck/doc/Makefile.in @@ -0,0 +1,182 @@ +.PHONY: clean install uninstall + +MANDIR=@MANDIR@ +GZIP=@GZIP@ +GZIP_SUFFIX=.3@GZIP_SUFFIX@ +BUILD_DIR=@BUILD_DIR@ +SRC_DIR=@SRC_DIR@ +HTML_SUFFIX=.html + +OBJECTS=CK_ARRAY_FOREACH \ + ck_array_buffer \ + ck_array_commit \ + ck_array_deinit \ + ck_array_init \ + ck_array_initialized \ + ck_array_length \ + ck_array_put \ + ck_array_put_unique \ + ck_array_remove \ + ck_array_deinit \ + ck_brlock \ + ck_ht_count \ + ck_ht_destroy \ + ck_ht_gc \ + ck_ht_get_spmc \ + ck_ht_grow_spmc \ + ck_ht_hash \ + ck_ht_hash_direct \ + ck_ht_init \ + ck_ht_put_spmc \ + ck_ht_remove_spmc \ + ck_ht_reset_spmc \ + ck_ht_reset_size_spmc \ + ck_ht_set_spmc \ + ck_ht_entry_empty \ + ck_ht_entry_key \ + ck_ht_entry_key_direct \ + ck_ht_entry_key_length \ + ck_ht_entry_key_set \ + ck_ht_entry_key_set_direct \ + ck_ht_entry_set \ + ck_ht_entry_set_direct \ + ck_ht_entry_value_direct \ + ck_ht_entry_value \ + ck_ht_iterator_init \ + ck_ht_next \ + ck_ht_stat \ + ck_bitmap_init \ + ck_bitmap_reset \ + ck_bitmap_set \ + ck_bitmap_test \ + ck_bitmap_base \ + ck_bitmap_union \ + ck_bitmap_size \ + ck_bitmap_clear \ + ck_bitmap_bits \ + ck_bitmap_buffer \ + ck_bitmap_next \ + ck_bitmap_iterator_init \ + ck_elide \ + ck_epoch_barrier \ + ck_epoch_begin \ + ck_epoch_call \ + ck_epoch_end \ + ck_epoch_init \ + ck_epoch_poll \ + ck_epoch_recycle \ + ck_epoch_register \ + ck_epoch_reclaim \ + ck_epoch_synchronize \ + ck_epoch_unregister \ + ck_hs_gc \ + ck_hs_init \ + ck_hs_destroy \ + CK_HS_HASH \ + ck_hs_iterator_init \ + ck_hs_next \ + ck_hs_get \ + ck_hs_put \ + ck_hs_set \ + ck_hs_fas \ + ck_hs_remove \ + ck_hs_move \ + ck_hs_grow \ + ck_hs_rebuild \ + ck_hs_count \ + ck_hs_reset \ + ck_hs_reset_size \ + ck_hs_stat \ + ck_rwcohort \ + CK_RWCOHORT_INIT \ + CK_RWCOHORT_INSTANCE \ + CK_RWCOHORT_PROTOTYPE \ + CK_RWCOHORT_READ_LOCK \ + CK_RWCOHORT_READ_UNLOCK \ + CK_RWCOHORT_WRITE_LOCK \ + CK_RWCOHORT_WRITE_UNLOCK \ + ck_cohort \ + CK_COHORT_PROTOTYPE \ + CK_COHORT_TRYLOCK_PROTOTYPE \ + CK_COHORT_INSTANCE \ + CK_COHORT_INIT \ + CK_COHORT_LOCK \ + CK_COHORT_UNLOCK \ + CK_COHORT_TRYLOCK \ + ck_pr \ + ck_pr_fence_acquire \ + ck_pr_fence_release \ + ck_pr_barrier \ + ck_pr_fas \ + ck_pr_fence_atomic \ + ck_pr_fence_atomic_load \ + ck_pr_fence_atomic_store \ + ck_pr_fence_load \ + ck_pr_fence_load_atomic \ + ck_pr_fence_load_store \ + ck_pr_fence_load_depends \ + ck_pr_fence_memory \ + ck_pr_fence_store \ + ck_pr_fence_store_atomic \ + ck_pr_fence_store_load \ + ck_pr_stall \ + ck_pr_faa \ + ck_pr_inc \ + ck_pr_dec \ + ck_pr_not \ + ck_pr_neg \ + ck_pr_add \ + ck_pr_sub \ + ck_pr_and \ + ck_pr_xor \ + ck_pr_or \ + ck_pr_cas \ + ck_pr_bts \ + ck_pr_btc \ + ck_pr_btr \ + ck_pr_store \ + ck_pr_load \ + ck_pr_rtm \ + ck_queue \ + ck_ring_init \ + ck_ring_dequeue_spmc \ + ck_ring_enqueue_spmc \ + ck_ring_enqueue_spmc_size \ + ck_ring_trydequeue_spmc \ + ck_ring_dequeue_spsc \ + ck_ring_enqueue_spsc \ + ck_ring_enqueue_spsc_size \ + ck_ring_size \ + ck_ring_capacity \ + ck_tflock \ + ck_rwlock \ + ck_pflock \ + ck_swlock \ + ck_sequence \ + ck_spinlock + +all: + for target in $(OBJECTS); do \ + $(GZIP) $(SRC_DIR)/doc/$$target > $(BUILD_DIR)/doc/$$target$(GZIP_SUFFIX); \ + done + +html: + for target in $(OBJECTS); do \ + echo $$target; \ + groff -man -Tascii $(SRC_DIR)/doc/$$target | \ + man2html -noheads -bare -cgiurl='$$title.html' > \ + $(BUILD_DIR)/doc/$$target$(HTML_SUFFIX); \ + done + +install: + mkdir -p $(DESTDIR)/$(MANDIR)/man3 || exit + cp *$(GZIP_SUFFIX) $(DESTDIR)/$(MANDIR)/man3 || exit + +uninstall: + for target in $(OBJECTS); do \ + rm -f $(DESTDIR)/$(MANDIR)/man3/$$target$(GZIP_SUFFIX); \ + done + +clean: + rm -f $(BUILD_DIR)/doc/*~ $(BUILD_DIR)/doc/*.3.gz $(BUILD_DIR)/doc/*.html + http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f098175e/lib/ck/doc/ck_array_buffer ---------------------------------------------------------------------- diff --git a/lib/ck/doc/ck_array_buffer b/lib/ck/doc/ck_array_buffer new file mode 100644 index 0000000..7a8ded3 --- /dev/null +++ b/lib/ck/doc/ck_array_buffer @@ -0,0 +1,60 @@ +.\" +.\" 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 October 18, 2013 +.Dt CK_ARRAY_BUFFER 3 +.Sh NAME +.Nm ck_array_buffer +.Nd return length and pointer to array of reader-visible pointers +.Sh LIBRARY +Concurrency Kit (libck, \-lck) +.Sh SYNOPSIS +.In ck_array.h +.Ft void * +.Fn ck_array_buffer "ck_array_t *array" "unsigned int *length" +.Sh DESCRIPTION +The +.Fn ck_array_buffer 3 +returns a pointer to the array of pointers currently visible +to readers after the last commit operation in +.Fa array . +The unsigned integer pointed to by +.Fa length +is updated to reflect the length of the array. +.Sh RETURN VALUES +This function returns a pointer to an array of pointers. +.Sh SEE ALSO +.Xr ck_array_commit 3 , +.Xr ck_array_put 3 , +.Xr ck_array_put_unique 3 , +.Xr ck_array_remove 3 , +.Xr ck_array_init 3 +.Xr ck_array_deinit 3 , +.Xr ck_array_length 3 , +.Xr ck_array_initialized 3 , +.Xr CK_ARRAY_FOREACH 3 +.Pp +Additional information available at http://concurrencykit.org/ http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f098175e/lib/ck/doc/ck_array_commit ---------------------------------------------------------------------- diff --git a/lib/ck/doc/ck_array_commit b/lib/ck/doc/ck_array_commit new file mode 100644 index 0000000..0fc1192 --- /dev/null +++ b/lib/ck/doc/ck_array_commit @@ -0,0 +1,58 @@ +.\" +.\" 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 October 18, 2013 +.Dt CK_ARRAY_COMMIT 3 +.Sh NAME +.Nm ck_array_commit +.Nd linearization point for mutations before commit call +.Sh LIBRARY +Concurrency Kit (libck, \-lck) +.Sh SYNOPSIS +.In ck_array.h +.Ft bool +.Fn ck_array_commit "ck_array_t *array" +.Sh DESCRIPTION +The +.Fn ck_array_commit 3 +function will commit any pending put or remove operations associated +with the array. The function may end up requesting the safe reclamation +of memory actively being iterated upon by other threads. +.Sh RETURN VALUES +This function returns true if the commit operation succeeded. It will +return false otherwise, and pending operations will not be applied. +.Sh SEE ALSO +.Xr ck_array_init 3 , +.Xr ck_array_put 3 , +.Xr ck_array_put_unique 3 , +.Xr ck_array_remove 3 , +.Xr ck_array_deinit 3 +.Xr ck_array_length 3 , +.Xr ck_array_buffer 3 , +.Xr ck_array_initialized 3 , +.Xr CK_ARRAY_FOREACH 3 +.Pp +Additional information available at http://concurrencykit.org/ http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f098175e/lib/ck/doc/ck_array_deinit ---------------------------------------------------------------------- diff --git a/lib/ck/doc/ck_array_deinit b/lib/ck/doc/ck_array_deinit new file mode 100644 index 0000000..3a5e5ab --- /dev/null +++ b/lib/ck/doc/ck_array_deinit @@ -0,0 +1,62 @@ +.\" +.\" 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 October 18, 2013 +.Dt CK_ARRAY_DEINIT 3 +.Sh NAME +.Nm ck_array_deinit +.Nd destroy and deinitialize a pointer array +.Sh LIBRARY +Concurrency Kit (libck, \-lck) +.Sh SYNOPSIS +.In ck_array.h +.Ft void +.Fn ck_array_deinit "ck_array_t *array" "bool defer" +.Sh DESCRIPTION +The +.Fn ck_array_deinit 3 +destroys the memory associated with the array pointed +to by +.Fa array . +The +.Fa defer +argument is true if the allocator must destroy +the memory using safe memory reclamation or false +if the allocator can destroy this memory immediately. +.Sh RETURN VALUES +This function has no return value. +.Sh SEE ALSO +.Xr ck_array_commit 3 , +.Xr ck_array_put 3 , +.Xr ck_array_put_unique 3 , +.Xr ck_array_remove 3 , +.Xr ck_array_init 3 +.Xr ck_array_length 3 , +.Xr ck_array_buffer 3 , +.Xr ck_array_initialized 3 , +.Xr CK_ARRAY_FOREACH 3 +.Pp +Additional information available at http://concurrencykit.org/ http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f098175e/lib/ck/doc/ck_array_init ---------------------------------------------------------------------- diff --git a/lib/ck/doc/ck_array_init b/lib/ck/doc/ck_array_init new file mode 100644 index 0000000..ad8a9fe --- /dev/null +++ b/lib/ck/doc/ck_array_init @@ -0,0 +1,69 @@ +.\" +.\" 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 October 18, 2013 +.Dt CK_ARRAY_INIT 3 +.Sh NAME +.Nm ck_array_init +.Nd initialize a pointer array +.Sh LIBRARY +Concurrency Kit (libck, \-lck) +.Sh SYNOPSIS +.In ck_array.h +.Ft bool +.Fn ck_array_init "ck_array_t *array" "unsigned int mode" "struct ck_malloc *allocator" "unsigned int initial_length" +.Sh DESCRIPTION +The +.Fn ck_array_init 3 +function initializes the array pointed to by the argument +.Fa array . +The mode value must be +.Dv CK_ARRAY_MODE_SPMC . +The +.Fa allocator +argument must point to a ck_malloc data structure with valid non-NULL function pointers +initialized for malloc, free and realloc. The +.Fa initial_length +specifies the initial length of the array. The value of +.Fa initial_length +must be greater than or equal to 2. An array allows for one concurrent put or remove operations +in the presence of any number of concurrent CK_ARRAY_FOREACH operations. +.Sh RETURN VALUES +This function returns true if the array was successfully created. It returns +false if the creation failed. Failure may occur due to internal memory allocation +failures or invalid arguments. +.Sh SEE ALSO +.Xr ck_array_commit 3 , +.Xr ck_array_put 3 , +.Xr ck_array_put_unique 3 , +.Xr ck_array_remove 3 , +.Xr ck_array_deinit 3 +.Xr ck_array_length 3 , +.Xr ck_array_buffer 3 , +.Xr ck_array_initialized 3 , +.Xr CK_ARRAY_FOREACH 3 +.Pp +Additional information available at http://concurrencykit.org/ http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f098175e/lib/ck/doc/ck_array_initialized ---------------------------------------------------------------------- diff --git a/lib/ck/doc/ck_array_initialized b/lib/ck/doc/ck_array_initialized new file mode 100644 index 0000000..3a06413 --- /dev/null +++ b/lib/ck/doc/ck_array_initialized @@ -0,0 +1,62 @@ +.\" +.\" 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 October 18, 2013 +.Dt CK_ARRAY_INITIALIZED 3 +.Sh NAME +.Nm ck_array_initialized +.Nd indicates whether an array was recently initialized or deinitialized +.Sh LIBRARY +Concurrency Kit (libck, \-lck) +.Sh SYNOPSIS +.In ck_array.h +.Ft bool +.Fn ck_array_initialized "ck_array_t *array" +.Sh DESCRIPTION +The +.Fn ck_array_initialized 3 +can be used to determine whether an array was recently initialized +with +.Fn ck_array_init 3 +or deinitialized with +.Fn ck_array_deinit 3 . +Behavior is undefined if a user allocates internal allocator data +in through other means. +.Sh RETURN VALUES +This function returns true if the array is initialized, and false +otherwise. +.Sh SEE ALSO +.Xr ck_array_commit 3 , +.Xr ck_array_put 3 , +.Xr ck_array_put_unique 3 , +.Xr ck_array_remove 3 , +.Xr ck_array_init 3 +.Xr ck_array_deinit 3 , +.Xr ck_array_length 3 , +.Xr ck_array_buffer 3 , +.Xr CK_ARRAY_FOREACH 3 +.Pp +Additional information available at http://concurrencykit.org/ http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f098175e/lib/ck/doc/ck_array_length ---------------------------------------------------------------------- diff --git a/lib/ck/doc/ck_array_length b/lib/ck/doc/ck_array_length new file mode 100644 index 0000000..e60c6c3 --- /dev/null +++ b/lib/ck/doc/ck_array_length @@ -0,0 +1,57 @@ +.\" +.\" 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 October 18, 2013 +.Dt CK_ARRAY_LENGTH 3 +.Sh NAME +.Nm ck_array_length +.Nd returns the number of pointers committed to an array +.Sh LIBRARY +Concurrency Kit (libck, \-lck) +.Sh SYNOPSIS +.In ck_array.h +.Ft unsigned int +.Fn ck_array_length "ck_array_t *array" +.Sh DESCRIPTION +The +.Fn ck_array_length 3 +function returns the number of items a concurrent +traversal operation would encounter at completion +time. +.Sh RETURN VALUES +The number of traversal-visible pointers is returned. +.Sh SEE ALSO +.Xr ck_array_commit 3 , +.Xr ck_array_put 3 , +.Xr ck_array_put_unique 3 , +.Xr ck_array_remove 3 , +.Xr ck_array_init 3 +.Xr ck_array_deinit 3 , +.Xr ck_array_buffer 3 , +.Xr ck_array_initialized 3 , +.Xr CK_ARRAY_FOREACH 3 +.Pp +Additional information available at http://concurrencykit.org/ http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f098175e/lib/ck/doc/ck_array_put ---------------------------------------------------------------------- diff --git a/lib/ck/doc/ck_array_put b/lib/ck/doc/ck_array_put new file mode 100644 index 0000000..0f74eb0 --- /dev/null +++ b/lib/ck/doc/ck_array_put @@ -0,0 +1,65 @@ +.\" +.\" 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 October 18, 2013 +.Dt CK_ARRAY_PUT 3 +.Sh NAME +.Nm ck_array_put +.Nd attempt immediate or deferred insertion of a pointer into array +.Sh LIBRARY +Concurrency Kit (libck, \-lck) +.Sh SYNOPSIS +.In ck_array.h +.Ft bool +.Fn ck_array_put "ck_array_t *array" "void *pointer" +.Sh DESCRIPTION +The +.Fn ck_array_put 3 +function will attempt to insert the value of +.Fa pointer +into the array pointed to by +.Fa array . +This function may incur additional memory allocations +if not enough memory has been allocated in the array +for a new entry. The operation is also free to apply +the operation immediately if there is an opportunity +for elimination with a pending (uncommitted) remove +operation. +.Sh RETURN VALUES +This function returns true if the put operation succeeded. It will +return false otherwise due to internal allocation failures. +.Sh SEE ALSO +.Xr ck_array_init 3 , +.Xr ck_array_commit 3 , +.Xr ck_array_put_unique 3 , +.Xr ck_array_remove 3 , +.Xr ck_array_deinit 3 +.Xr ck_array_length 3 , +.Xr ck_array_buffer 3 , +.Xr ck_array_initialized 3 , +.Xr CK_ARRAY_FOREACH 3 +.Pp +Additional information available at http://concurrencykit.org/ http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f098175e/lib/ck/doc/ck_array_put_unique ---------------------------------------------------------------------- diff --git a/lib/ck/doc/ck_array_put_unique b/lib/ck/doc/ck_array_put_unique new file mode 100644 index 0000000..bb355fe --- /dev/null +++ b/lib/ck/doc/ck_array_put_unique @@ -0,0 +1,67 @@ +.\" +.\" 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 October 18, 2013 +.Dt CK_ARRAY_PUT_UNIQUE 3 +.Sh NAME +.Nm ck_array_put_unique +.Nd attempt immediate or deferred insertion of a unique pointer into array +.Sh LIBRARY +Concurrency Kit (libck, \-lck) +.Sh SYNOPSIS +.In ck_array.h +.Ft int +.Fn ck_array_put_unique "ck_array_t *array" "void *pointer" +.Sh DESCRIPTION +The +.Fn ck_array_put_unique 3 +function will attempt to insert the value of +.Fa pointer +into the array pointed to by +.Fa array . +This function may incur additional memory allocations +if not enough memory has been allocated in the array +for a new entry. The operation is also free to apply +the operation immediately if there is an opportunity +for elimination with a pending (uncommitted) remove +operation. The function will not make any modifications +if the pointer already exists in the array. +.Sh RETURN VALUES +This function returns 1 if the pointer already exists in the array. +It returns 0 if the put operation succeeded. It returns -1 on +error due to internal memory allocation failures. +.Sh SEE ALSO +.Xr ck_array_init 3 , +.Xr ck_array_commit 3 , +.Xr ck_array_put 3 , +.Xr ck_array_remove 3 , +.Xr ck_array_deinit 3 +.Xr ck_array_length 3 , +.Xr ck_array_buffer 3 , +.Xr ck_array_initialized 3 , +.Xr CK_ARRAY_FOREACH 3 +.Pp +Additional information available at http://concurrencykit.org/ http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f098175e/lib/ck/doc/ck_array_remove ---------------------------------------------------------------------- diff --git a/lib/ck/doc/ck_array_remove b/lib/ck/doc/ck_array_remove new file mode 100644 index 0000000..8df454d --- /dev/null +++ b/lib/ck/doc/ck_array_remove @@ -0,0 +1,64 @@ +.\" +.\" 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 October 18, 2013 +.Dt CK_ARRAY_REMOVE 3 +.Sh NAME +.Nm ck_array_remove +.Nd attempt immediate or deferred removal of a pointer from an array +.Sh LIBRARY +Concurrency Kit (libck, \-lck) +.Sh SYNOPSIS +.In ck_array.h +.Ft bool +.Fn ck_array_remove "ck_array_t *array" "void *pointer" +.Sh DESCRIPTION +The +.Fn ck_array_remove 3 +function will attempt to remove the value of +.Fa pointer +into the array pointed to by +.Fa array . The operation is also free to apply +the operation immediately if there is an opportunity +for elimination with a pending (uncommitted) put +operation. If no elimination was possible, the function +may require to allocate more memory. +.Sh RETURN VALUES +This function returns true if the remove operation succeeded. It will +return false otherwise due to internal allocation failures or because +the value did not exist. +.Sh SEE ALSO +.Xr ck_array_init 3 , +.Xr ck_array_commit 3 , +.Xr ck_array_remove 3 , +.Xr ck_array_put_unique 3 , +.Xr ck_array_deinit 3 +.Xr ck_array_length 3 , +.Xr ck_array_buffer 3 , +.Xr ck_array_initialized 3 , +.Xr CK_ARRAY_FOREACH 3 +.Pp +Additional information available at http://concurrencykit.org/ http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f098175e/lib/ck/doc/ck_bitmap_base ---------------------------------------------------------------------- diff --git a/lib/ck/doc/ck_bitmap_base b/lib/ck/doc/ck_bitmap_base new file mode 100644 index 0000000..e9342bf --- /dev/null +++ b/lib/ck/doc/ck_bitmap_base @@ -0,0 +1,58 @@ +.\" +.\" 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 April 22, 2012 +.Dt CK_BITMAP_BASE 3 +.Sh NAME +.Nm ck_bitmap_base +.Nd determine the size of a bit array in bytes +.Sh LIBRARY +Concurrency Kit (libck, \-lck) +.Sh SYNOPSIS +.In ck_bitmap.h +.Ft unsigned int +.Fn ck_bitmap_base "unsigned int n_bits" +.Sh DESCRIPTION +The +.Fn ck_bitmap_base +function returns the number of bytes that would be used +to store the number of bits specified by +.Fa n_bits . +.Sh RETURN VALUES +This function returns a non-zero value that is guaranteed to +be a multiple of +.Dv sizeof(CK_BITMAP_WORD) . +.Sh SEE ALSO +.Xr ck_bitmap_size 3 , +.Xr ck_bitmap_init 3 , +.Xr ck_bitmap_set 3 , +.Xr ck_bitmap_reset 3 , +.Xr ck_bitmap_test 3 , +.Xr ck_bitmap_clear 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/f098175e/lib/ck/doc/ck_bitmap_bits ---------------------------------------------------------------------- diff --git a/lib/ck/doc/ck_bitmap_bits b/lib/ck/doc/ck_bitmap_bits new file mode 100644 index 0000000..efd5eb2 --- /dev/null +++ b/lib/ck/doc/ck_bitmap_bits @@ -0,0 +1,56 @@ +.\" +.\" 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 April 22, 2012 +.Dt CK_BITMAP_BITS 3 +.Sh NAME +.Nm ck_bitmap_bits +.Nd return number of addressable bits in bitmap +.Sh LIBRARY +Concurrency Kit (libck, \-lck) +.Sh SYNOPSIS +.In ck_bitmap.h +.Ft unsigned int +.Fn ck_bitmap_bits "ck_bitmap_t *bitmap" +.Sh DESCRIPTION +The +.Fn ck_bitmap_bits +function returns the maximum number of addressable bits in +the object pointed to by +.Fa bitmap . +.Sh RETURN VALUES +This function returns a non-zero value. +.Sh SEE ALSO +.Xr ck_bitmap_base 3 , +.Xr ck_bitmap_size 3 , +.Xr ck_bitmap_init 3 , +.Xr ck_bitmap_set 3 , +.Xr ck_bitmap_reset 3 , +.Xr ck_bitmap_test 3 , +.Xr ck_bitmap_clear 3 , +.Xr ck_bitmap_buffer 3 +.Pp +Additional information available at http://concurrencykit.org/ http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f098175e/lib/ck/doc/ck_bitmap_buffer ---------------------------------------------------------------------- diff --git a/lib/ck/doc/ck_bitmap_buffer b/lib/ck/doc/ck_bitmap_buffer new file mode 100644 index 0000000..206df03 --- /dev/null +++ b/lib/ck/doc/ck_bitmap_buffer @@ -0,0 +1,65 @@ +.\" +.\" 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 April 22, 2012 +.Dt CK_BITMAP_BUFFER 3 +.Sh NAME +.Nm ck_bitmap_buffer +.Nd returns pointer to bit array +.Sh LIBRARY +Concurrency Kit (libck, \-lck) +.Sh SYNOPSIS +.In ck_bitmap.h +.Ft void * +.Fn ck_bitmap_buffer "ck_bitmap_t *bitmap" +.Sh DESCRIPTION +The +.Fn ck_bitmap_buffer +functions returns a pointer to the actual bit array. +For ck_bitmap pointers, the bit array is of type +CK_BITMAP_WORD[] and consists of +ck_bitmap_base(bitmap) / sizeof(CK_BITMAP_WORD) elements. +On currently supported 64-bit platforms +.Dv CK_BITMAP_WORD +is +.Dv uint64_t . +On currently supported 32-bit platforms +.Dv CK_BITMAP_WORD +is +.Dv uint32_t . +.Sh RETURN VALUES +This function returns a non-NULL value. +.Sh SEE ALSO +.Xr ck_bitmap_base 3 , +.Xr ck_bitmap_size 3 , +.Xr ck_bitmap_init 3 , +.Xr ck_bitmap_set 3 , +.Xr ck_bitmap_reset 3 , +.Xr ck_bitmap_test 3 , +.Xr ck_bitmap_clear 3 , +.Xr ck_bitmap_bits 3 +.Pp +Additional information available at http://concurrencykit.org/ http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f098175e/lib/ck/doc/ck_bitmap_clear ---------------------------------------------------------------------- diff --git a/lib/ck/doc/ck_bitmap_clear b/lib/ck/doc/ck_bitmap_clear new file mode 100644 index 0000000..f94dca2 --- /dev/null +++ b/lib/ck/doc/ck_bitmap_clear @@ -0,0 +1,56 @@ +.\" +.\" 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 April 22, 2012 +.Dt CK_BITMAP_CLEAR 3 +.Sh NAME +.Nm ck_bitmap_clear +.Nd reset all bits +.Sh LIBRARY +Concurrency Kit (libck, \-lck) +.Sh SYNOPSIS +.In ck_bitmap.h +.Ft void +.Fn ck_bitmap_clear "ck_bitmap_t *bitmap" +.Sh DESCRIPTION +The +.Fn ck_bitmap_clear +function sets all bits in the bitmap pointed to by +.Fa bitmap +to 0. +.Sh RETURN VALUES +This function has no return value. +.Sh SEE ALSO +.Xr ck_bitmap_base 3 , +.Xr ck_bitmap_size 3 , +.Xr ck_bitmap_init 3 , +.Xr ck_bitmap_set 3 , +.Xr ck_bitmap_reset 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/f098175e/lib/ck/doc/ck_bitmap_init ---------------------------------------------------------------------- diff --git a/lib/ck/doc/ck_bitmap_init b/lib/ck/doc/ck_bitmap_init new file mode 100644 index 0000000..a238374 --- /dev/null +++ b/lib/ck/doc/ck_bitmap_init @@ -0,0 +1,84 @@ +.\" +.\" 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 April 22, 2012 +.Dt CK_BITMAP_INIT 3 +.Sh NAME +.Nm ck_bitmap_init +.Nd initialize a bitmap +.Sh LIBRARY +Concurrency Kit (libck, \-lck) +.Sh SYNOPSIS +.In ck_bitmap.h +.Ft void +.Fn ck_bitmap_init "ck_bitmap_t *bitmap" "unsigned int n_bits" "bool set" +.Sh DESCRIPTION +The +.Fn ck_bitmap_init +function initializes the bitmap pointed to by the +.Fa bitmap +pointer. The argument +.Fa n_bits +specifies the number of bits that are to be stored in the bitmap. +The argument +.Fa set +determines whether the values of the bits in +.Fa bitmap +are to be initialized to +.Dv 1 +or +.Dv 0 . +.Pp +It is expected that +.Fa bitmap +points to a contiguous region of memory containing at least +the number of bytes specified by +.Xr ck_bitmap_size 3 . +.Sh RETURN VALUES +This function has no return value. +.Sh ERRORS +.Bl -tag -width Er +.Pp +The behavior of +.Fn ck_bitmap_init +is undefined if +.Fa bitmap +is not a pointer to a region of bytes +of at least +.Xr ck_bitmap_size 3 +length. +.El +.Sh SEE ALSO +.Xr ck_bitmap_base 3 , +.Xr ck_bitmap_size 3 , +.Xr ck_bitmap_set 3 , +.Xr ck_bitmap_reset 3 , +.Xr ck_bitmap_clear 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/f098175e/lib/ck/doc/ck_bitmap_iterator_init ---------------------------------------------------------------------- diff --git a/lib/ck/doc/ck_bitmap_iterator_init b/lib/ck/doc/ck_bitmap_iterator_init new file mode 100644 index 0000000..d67c659 --- /dev/null +++ b/lib/ck/doc/ck_bitmap_iterator_init @@ -0,0 +1,70 @@ +.\" +.\" Copyright 2012-2013 Samy Al Bahra. +.\" Copyright 2012-2013 Shreyas Prasad. +.\" 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 April 27, 2012 +.Dt CK_BITMAP_ITERATOR_INIT 3 +.Sh NAME +.Nm ck_bitmap_iterator_init +.Nd initialize bitmap iterator +.Sh LIBRARY +Concurrency Kit (libck, \-lck) +.Sh SYNOPSIS +.In ck_ht.h +.Pp +.Ft void +.Fn ck_bitmap_iterator_init "ck_bitmap_iterator_t *iterator" "ck_bitmap_t *bitmap" +.Sh DESCRIPTION +The +.Fn ck_bitmap_iterator_init +function will initialize the object pointed to by +the +.Fa iterator +argument for use with +.Fa bitmap . +.Pp +An iterator is used to iterate through set bitmap bits +with the +.Xr ck_bitmap_next 3 +function. +.Sh RETURN VALUES +The +.Fn ck_bitmap_iterator_init +function does not return a value. +.Sh ERRORS +This function will not fail. +.Sh SEE ALSO +.Xr ck_bitmap_base 3 , +.Xr ck_bitmap_size 3 , +.Xr ck_bitmap_init 3 , +.Xr ck_bitmap_set 3 , +.Xr ck_bitmap_reset 3 , +.Xr ck_bitmap_clear 3 , +.Xr ck_bitmap_bits 3 , +.Xr ck_bitmap_buffer 3 , +.Xr ck_bitmap_next 3 +.Pp +Additional information available at http://concurrencykit.org/ http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f098175e/lib/ck/doc/ck_bitmap_next ---------------------------------------------------------------------- diff --git a/lib/ck/doc/ck_bitmap_next b/lib/ck/doc/ck_bitmap_next new file mode 100644 index 0000000..3e93c43 --- /dev/null +++ b/lib/ck/doc/ck_bitmap_next @@ -0,0 +1,90 @@ +.\" +.\" Copyright 2012-2013 Samy Al Bahra. +.\" Copyright 2012-2013 Shreyas Prasad. +.\" 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 April 27, 2012 +.Dt CK_BITMAP_TEST 3 +.Sh NAME +.Nm ck_bitmap_next +.Nd iterate to the next set bit in bitmap +.Sh LIBRARY +Concurrency Kit (libck, \-lck) +.Sh SYNOPSIS +.In ck_bitmap.h +.Ft bool +.Fn ck_bitmap_next "ck_bitmap_t *bitmap" "ck_bitmap_iterator_t iterator" "unsigned int *bit" +.Sh DESCRIPTION +The +.Fn ck_bitmap_next +function will increment the iterator object pointed to by +.Fa iterator +to point to the next set bit in the bitmap. If +.Fn ck_bitmap_next +returns +.Dv true +then the pointer pointed to by +.Fa bit +is initialized to the number of the current set bit pointed to by the +.Fa iterator +object. +.Pp +It is expected that +.Fa iterator +has been initialized using the +.Xr ck_bitmap_iterator_init 3 +function. +.Sh RETURN VALUES +If +.Fn ck_bitmap_next +returns +.Dv true +then the object pointed to by +.Fa bit +contains a set bit. If +.Fn ck_bitmap_next +returns +.Dv false +then value of the object pointed to by +.Fa bit +is undefined. +.Sh ERRORS +Behavior is undefined if +.Fa iterator +or +.Fa bitmap +are uninitialized. +.Sh SEE ALSO +.Xr ck_bitmap_base 3 , +.Xr ck_bitmap_size 3 , +.Xr ck_bitmap_init 3 , +.Xr ck_bitmap_set 3 , +.Xr ck_bitmap_reset 3 , +.Xr ck_bitmap_clear 3 , +.Xr ck_bitmap_bits 3 , +.Xr ck_bitmap_buffer 3 , +.Xr ck_bitmap_iterator_init 3 +.Pp +Additional information available at http://concurrencykit.org/ http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f098175e/lib/ck/doc/ck_bitmap_reset ---------------------------------------------------------------------- diff --git a/lib/ck/doc/ck_bitmap_reset b/lib/ck/doc/ck_bitmap_reset new file mode 100644 index 0000000..c6b8ee5 --- /dev/null +++ b/lib/ck/doc/ck_bitmap_reset @@ -0,0 +1,57 @@ +.\" +.\" 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 April 22, 2012 +.Dt CK_BITMAP_RESET 3 +.Sh NAME +.Nm ck_bitmap_reset +.Nd resets the bit at the specified index +.Sh LIBRARY +Concurrency Kit (libck, \-lck) +.Sh SYNOPSIS +.In ck_bitmap.h +.Ft void +.Fn ck_bitmap_reset "ck_bitmap_t *bitmap" "unsigned int n" +.Sh DESCRIPTION +The +.Fn ck_bitmap_reset +resets the bit at offset specified by the argument +.Fa n +to +.Dv 0 . +.Sh RETURN VALUES +This function has no return value. +.Sh SEE ALSO +.Xr ck_bitmap_base 3 , +.Xr ck_bitmap_size 3 , +.Xr ck_bitmap_init 3 , +.Xr ck_bitmap_set 3 , +.Xr ck_bitmap_clear 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/f098175e/lib/ck/doc/ck_bitmap_set ---------------------------------------------------------------------- diff --git a/lib/ck/doc/ck_bitmap_set b/lib/ck/doc/ck_bitmap_set new file mode 100644 index 0000000..e92ba24 --- /dev/null +++ b/lib/ck/doc/ck_bitmap_set @@ -0,0 +1,57 @@ +.\" +.\" 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 April 22, 2012 +.Dt CK_BITMAP_SET 3 +.Sh NAME +.Nm ck_bitmap_set +.Nd set the bit at the specified index +.Sh LIBRARY +Concurrency Kit (libck, \-lck) +.Sh SYNOPSIS +.In ck_bitmap.h +.Ft void +.Fn ck_bitmap_set "ck_bitmap_t *bitmap" "unsigned int n" +.Sh DESCRIPTION +The +.Fn ck_bitmap_set +sets the bit at offset specified by the argument +.Fa n +to +.Dv 1 . +.Sh RETURN VALUES +This function has no return value. +.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_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/f098175e/lib/ck/doc/ck_bitmap_size ---------------------------------------------------------------------- diff --git a/lib/ck/doc/ck_bitmap_size b/lib/ck/doc/ck_bitmap_size new file mode 100644 index 0000000..03e5892 --- /dev/null +++ b/lib/ck/doc/ck_bitmap_size @@ -0,0 +1,62 @@ +.\" +.\" 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 April 22, 2012 +.Dt CK_BITMAP_SIZE 3 +.Sh NAME +.Nm ck_bitmap_size +.Nd returns necessary number of bytes for bitmap +.Sh LIBRARY +Concurrency Kit (libck, \-lck) +.Sh SYNOPSIS +.In ck_bitmap.h +.Ft unsigned int +.Fn ck_bitmap_size "unsigned int n_bits" +.Sh DESCRIPTION +The +.Fn ck_bitmap_size +function returns the number of bytes that are necessary +to allocate for a bitmap that will contain the number +of bits specified by +.Fa n_bits . +.Pp +This function is used to determine how many bytes to +allocate for dynamically created bitmap objects. The +allocated object must still be initialized using +.Xr ck_bitmap_init 3 . +.Sh RETURN VALUES +This function returns a non-zero value. +.Sh SEE ALSO +.Xr ck_bitmap_base 3 , +.Xr ck_bitmap_init 3 , +.Xr ck_bitmap_set_mpmc 3 , +.Xr ck_bitmap_reset_mpmc 3 , +.Xr ck_bitmap_test 3 , +.Xr ck_bitmap_clear 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/f098175e/lib/ck/doc/ck_bitmap_test ---------------------------------------------------------------------- diff --git a/lib/ck/doc/ck_bitmap_test b/lib/ck/doc/ck_bitmap_test new file mode 100644 index 0000000..9eb8936 --- /dev/null +++ b/lib/ck/doc/ck_bitmap_test @@ -0,0 +1,62 @@ +.\" +.\" 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 April 22, 2012 +.Dt CK_BITMAP_TEST 3 +.Sh NAME +.Nm ck_bitmap_test +.Nd determine if the bit at the specified index is set +.Sh LIBRARY +Concurrency Kit (libck, \-lck) +.Sh SYNOPSIS +.In ck_bitmap.h +.Ft bool +.Fn ck_bitmap_test "ck_bitmap_t *bitmap" "unsigned int n" +.Sh DESCRIPTION +The +.Fn ck_bitmap_test +determines if the bit at the offset specified by the argument +.Fa n +is set to +.Dv 1 . +.Sh RETURN VALUES +This function returns +.Dv true +if the bit at the specified offset is set to +.Dv 1 +and otherwise returns +.Dv false . +.Sh SEE ALSO +.Xr ck_bitmap_base 3 , +.Xr ck_bitmap_size 3 , +.Xr ck_bitmap_init 3 , +.Xr ck_bitmap_set_mpmc 3 , +.Xr ck_bitmap_reset_mpmc 3 , +.Xr ck_bitmap_clear 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/f098175e/lib/ck/doc/ck_bitmap_union ---------------------------------------------------------------------- diff --git a/lib/ck/doc/ck_bitmap_union b/lib/ck/doc/ck_bitmap_union new file mode 100644 index 0000000..b0ab8e8 --- /dev/null +++ b/lib/ck/doc/ck_bitmap_union @@ -0,0 +1,58 @@ +.\" +.\" Copyright 2012-2014 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 February 23, 2013 +.Dt CK_BITMAP_UNION 3 +.Sh NAME +.Nm ck_bitmap_union +.Nd generates union of two bitmaps +.Sh LIBRARY +Concurrency Kit (libck, \-lck) +.Sh SYNOPSIS +.In ck_bitmap.h +.Ft void +.Fn ck_bitmap_union "ck_bitmap_t *dst" "ck_bitmap_t *src" +.Sh DESCRIPTION +The +.Fn ck_bitmap_union +function sets all bits in the bitmap pointed to by +.Fa src +in the bitmap pointed to by +.Fa dst . +.Sh RETURN VALUES +This function has no return value. +.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_set 3 , +.Xr ck_bitmap_clear 3 , +.Xr ck_bitmap_test 3 , +.Xr ck_bitmap_bits 3 , +.Xr ck_bitmap_buffer 3 +.Pp +Additional information available at http://concurrencykit.org/