You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
68 lines
2.9 KiB
68 lines
2.9 KiB
12 years ago
|
.\"
|
||
|
.\" Copyright 2013 Samy Al Bahra.
|
||
|
.\" 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 3
|
||
|
.Sh NAME
|
||
|
.Nm ck_cohort
|
||
|
.Nd Generalized interface for lock cohorts
|
||
|
.Sh LIBRARY
|
||
|
Concurrency Kit (libck, \-lck)
|
||
|
.Sh SYNOPSIS
|
||
|
.In ck_cohort.h
|
||
|
.Fn CK_COHORT_PROTOTYPE "cohort_name" "global_lock_type" "global_lock_method" \
|
||
|
"global_unlock_method" "local_lock_type" "local_lock_method" "local_unlock_method"
|
||
|
.Fn CK_COHORT_INSTANCE "cohort_name"
|
||
|
.Fn CK_COHORT_INIT "name" "ck_cohort *cohort" "global_lock" "local_lock" "unsigned int pass_limit"
|
||
|
.Fn CK_COHORT_LOCK "name" "ck_cohort *cohort" "void *global_context" "void *local_context"
|
||
|
.Fn CK_COHORT_UNLOCK "name" "ck_cohort *cohort" "void *global_context" "void *local_context"
|
||
|
.Sh DESCRIPTION
|
||
|
ck_cohort.h provides an interface for defining lock cohorts with
|
||
|
arbitrary lock types. Cohorts are a mechanism for coordinating
|
||
|
threads on NUMA architectures in order to reduce the frequency
|
||
|
with which a lock is passed between threads on different clusters.
|
||
|
.Pp
|
||
|
Before using a cohort, the user must define a cohort type using
|
||
|
the
|
||
|
.Fn CK_COHORT_PROTOTYPE
|
||
|
macro. This macro allows the user to specify the lock types that
|
||
|
they would like the cohort to use. See the
|
||
|
.Xr CK_COHORT_PROTOTYPE 3
|
||
|
man page for more details.
|
||
|
Cohort instances do not allocate any new memory, so they
|
||
|
can be freed after use without using an explicit dispose method.
|
||
|
.Pp
|
||
|
.Sh SEE ALSO
|
||
|
.Xr CK_COHORT_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_UNLOCK 3 ,
|
||
|
.Pp
|
||
|
Additional information available at http://concurrencykit.org/
|