whitespace: Whitespace clean-up of manual pages.

ck_pring
Samy Al Bahra 11 years ago
parent 80a556e4fc
commit e0f56ea113

@ -38,7 +38,7 @@ Concurrency Kit (libck, \-lck)
.Sh DESCRIPTION .Sh DESCRIPTION
Until a cohort instance is initialized using the CK_COHORT_INIT macro, any operations 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 involving it will have undefined behavior. After this macro has been called, the cohort
pointed to by the pointed to by the
.Fa cohort .Fa cohort
argument will use the lock pointed to by argument will use the lock pointed to by
.Fa global_lock .Fa global_lock
@ -48,8 +48,8 @@ as its local lock.
.Pp .Pp
The cohort will relinquish its global lock after The cohort will relinquish its global lock after
.Fa pass_limit .Fa pass_limit
consecutive acquisitions of its local lock, even if there are other threads waiting. consecutive acquisitions of its local lock, even if there are other threads waiting.
If you are unsure of a value to use for the If you are unsure of a value to use for the
.Fa pass_limit .Fa pass_limit
argument, you should use CK_COHORT_DEFAULT_LOCAL_PASS_LIMIT. argument, you should use CK_COHORT_DEFAULT_LOCAL_PASS_LIMIT.
.Sh SEE ALSO .Sh SEE ALSO

@ -38,11 +38,11 @@ Concurrency Kit (libck, \-lck)
.Sh DESCRIPTION .Sh DESCRIPTION
This call attempts to acquire both the local and global (if necessary) locks from This call attempts to acquire both the local and global (if necessary) locks from
.Fa cohort . .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 .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 .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 .Fa local_context
will be passed to the function specified by will be passed to the function specified by
.Fa local_lock_method .Fa local_lock_method

@ -37,7 +37,7 @@ Concurrency Kit (libck, \-lck)
"LOCK_FXN global_unlock_method" "LOCK_FXN local_lock_method" "LOCK_FXN local_unlock_method" "LOCK_FXN global_unlock_method" "LOCK_FXN local_lock_method" "LOCK_FXN local_unlock_method"
.Sh DESCRIPTION .Sh DESCRIPTION
The ck_cohort.h header file does not define any cohort types. Instead, the user must use 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 .Xr CK_COHORT_TRYLOCK_PROTOTYPE 3
macros to define any types they want to use. They must use CK_COHORT_TRYLOCK_PROTOTYPE 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. if they want their cohort type to support trylock operations.

@ -38,18 +38,18 @@ Concurrency Kit (libck, \-lck)
.Sh DESCRIPTION .Sh DESCRIPTION
This call attempts to acquire both the local and global (if necessary) locks from This call attempts to acquire both the local and global (if necessary) locks from
.Fa cohort . .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 .Xr CK_COHORT_TRYLOCK_PROTOTYPE 3
macro. The call will not block and will return a bool that will evaluate to true iff 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 .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 .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 .Fa local_trylock_context
will be passed to the function specified by will be passed to the function specified by
.Fa local_trylock_method . .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 local lock as well, and
.Fa local_unlock_context .Fa local_unlock_context
will be passed to the function specified by will be passed to the function specified by

@ -57,7 +57,7 @@ of the other CK_COHORT macros.
: This method should return true iff the global lock is acquired by a thread. : This method should return true iff the global lock is acquired by a thread.
.br .br
.Fa global_trylock_method .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. It should not block and return true iff the lock was successfully acquired.
.br .br
.Fa local_lock_method .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. : This method should return true iff the global lock is acquired by a thread.
.br .br
.Fa local_trylock_method .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. It should not block and return true iff the lock was successfully acquired.
.Pp .Pp
Instances of the defined cohort type can be declared as: Instances of the defined cohort type can be declared as:

@ -38,11 +38,11 @@ Concurrency Kit (libck, \-lck)
.Sh DESCRIPTION .Sh DESCRIPTION
This call instructs This call instructs
.Fa cohort .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 .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 .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 .Fa local_context
will be passed to the function specified by will be passed to the function specified by
.Fa local_lock_method .Fa local_lock_method

@ -40,11 +40,11 @@ Concurrency Kit (libck, \-lck)
This macro initializes the lock instance pointed to by the This macro initializes the lock instance pointed to by the
.Fa lock .Fa lock
argument. Until a lock instance is initialized using the CK_RWCOHORT_INIT macro, any operations 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 .Fa wait_limit
argument should only be used with reader-preference or writer-preference locks. For neutral argument should only be used with reader-preference or writer-preference locks. For neutral
locks, this argument should be excluded. 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 .Fa wait_limit
argument, you should use CK_RWCOHORT_STRATEGY_DEFAULT_LOCAL_WAIT_LIMIT. argument, you should use CK_RWCOHORT_STRATEGY_DEFAULT_LOCAL_WAIT_LIMIT.
.Sh SEE ALSO .Sh SEE ALSO

@ -38,9 +38,9 @@ Concurrency Kit (libck, \-lck)
.Fn CK_RWCOHORT_WP_INSTANCE "COHORT_NAME cohort_name" .Fn CK_RWCOHORT_WP_INSTANCE "COHORT_NAME cohort_name"
.Sh DESCRIPTION .Sh DESCRIPTION
The user must use this macro to declare instances of lock types that they have 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 .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 For instance, if CK_RWCOHORT_PROTOTYPE was called with the name "foo", the
CK_RWCOHORT_INSTANCE macro should be called as CK_RWCOHORT_INSTANCE macro should be called as
.br .br

@ -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. 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 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 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 .Xr CK_COHORT_PROTOTYPE 3
or or
.Xr CK_COHORT_TRYLOCK_PROTOTYPE 3 .Xr CK_COHORT_TRYLOCK_PROTOTYPE 3
macros. macros.
.Pp .Pp

@ -33,24 +33,24 @@
Concurrency Kit (libck, \-lck) Concurrency Kit (libck, \-lck)
.Sh SYNOPSIS .Sh SYNOPSIS
.In ck_cohort.h .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" "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" "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" "void *global_context" "void *local_context"
.Sh DESCRIPTION .Sh DESCRIPTION
This call will acquire read-only permission from This call will acquire read-only permission from
.Fa lock . .Fa lock .
The call will block until this permission has been acquired. The call will block until this permission has been acquired.
.Fa cohort .Fa cohort
must point to a cohort whose global lock is the same as all other cohorts used with must point to a cohort whose global lock is the same as all other cohorts used with
.Fa lock . .Fa lock .
The The
.Fa global_context .Fa global_context
and and
.Fa local_context .Fa local_context
arguments will be passed along as the context arguments to any calls to arguments will be passed along as the context arguments to any calls to
.Fa cohort . .Fa cohort .
. .
.Sh SEE ALSO .Sh SEE ALSO

@ -33,23 +33,23 @@
Concurrency Kit (libck, \-lck) Concurrency Kit (libck, \-lck)
.Sh SYNOPSIS .Sh SYNOPSIS
.In ck_cohort.h .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" "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" "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" "void *global_context" "void *local_context"
.Sh DESCRIPTION .Sh DESCRIPTION
This call will relinquish read-only permission to This call will relinquish read-only permission to
.Fa lock . .Fa lock .
.Fa cohort .Fa cohort
must point to a cohort whose global lock is the same as all other cohorts used with must point to a cohort whose global lock is the same as all other cohorts used with
.Fa lock . .Fa lock .
The The
.Fa global_context .Fa global_context
and and
.Fa local_context .Fa local_context
arguments will be passed along as the context arguments to any calls to arguments will be passed along as the context arguments to any calls to
.Fa cohort . .Fa cohort .
. .
.Sh SEE ALSO .Sh SEE ALSO

@ -33,24 +33,24 @@
Concurrency Kit (libck, \-lck) Concurrency Kit (libck, \-lck)
.Sh SYNOPSIS .Sh SYNOPSIS
.In ck_cohort.h .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" "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" "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" "void *global_context" "void *local_context"
.Sh DESCRIPTION .Sh DESCRIPTION
This call will acquire write permission for This call will acquire write permission for
.Fa lock . .Fa lock .
The call will block until this permission has been acquired. The call will block until this permission has been acquired.
.Fa cohort .Fa cohort
must point to a cohort whose global lock is the same as all other cohorts used with must point to a cohort whose global lock is the same as all other cohorts used with
.Fa lock . .Fa lock .
The The
.Fa global_context .Fa global_context
and and
.Fa local_context .Fa local_context
arguments will be passed along as the context arguments to any calls to arguments will be passed along as the context arguments to any calls to
.Fa cohort . .Fa cohort .
. .
.Sh SEE ALSO .Sh SEE ALSO

@ -33,23 +33,23 @@
Concurrency Kit (libck, \-lck) Concurrency Kit (libck, \-lck)
.Sh SYNOPSIS .Sh SYNOPSIS
.In ck_cohort.h .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" "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" "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" "void *global_context" "void *local_context"
.Sh DESCRIPTION .Sh DESCRIPTION
This call will relinquish write permission for This call will relinquish write permission for
.Fa lock . .Fa lock .
.Fa cohort .Fa cohort
must point to a cohort whose global lock is the same as all other cohorts used with must point to a cohort whose global lock is the same as all other cohorts used with
.Fa lock . .Fa lock .
The The
.Fa global_context .Fa global_context
and and
.Fa local_context .Fa local_context
arguments will be passed along as the context arguments to any calls to arguments will be passed along as the context arguments to any calls to
.Fa cohort . .Fa cohort .
. .
.Sh SEE ALSO .Sh SEE ALSO

@ -57,7 +57,7 @@ BOOL_LOCK_FXN refers to a method with the signature
bool(void *lock, void *context) bool(void *lock, void *context)
.Pp .Pp
The The
.Fa context .Fa context
argument in each signature is used to pass along any additional information that 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 the lock might need for its lock, unlock and trylock methods. The values for this
argument are provided to each call to argument are provided to each call to
@ -94,7 +94,7 @@ man pages for more details.
#include <ck_cohort.h> #include <ck_cohort.h>
#include <ck_spinlock.h> #include <ck_spinlock.h>
/* /*
* Create cohort methods with signatures that match * Create cohort methods with signatures that match
* the required signature * the required signature
*/ */
@ -169,7 +169,7 @@ main(void)
calloc(n_cohorts, sizeof(CK_COHORT_INSTANCE(test_cohort))); calloc(n_cohorts, sizeof(CK_COHORT_INSTANCE(test_cohort)));
/* create local locks to use with each 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)); calloc(n_cohorts, sizeof(ck_spinlock_t));
pthread_t *threads = pthread_t *threads =

@ -100,7 +100,7 @@ returns true, then the
.Fa UNLOCK_FUNCTION .Fa UNLOCK_FUNCTION
is executed. If RTM is unsupported (no CK_F_PR_RTM macro) then is executed. If RTM is unsupported (no CK_F_PR_RTM macro) then
.Fn CK_ELIDE_LOCK .Fn CK_ELIDE_LOCK
and and
.Fn CK_ELIDE_LOCK_ADAPTIVE .Fn CK_ELIDE_LOCK_ADAPTIVE
will immediately call will immediately call
.Fn LOCK_FUNCTION . .Fn LOCK_FUNCTION .
@ -118,7 +118,7 @@ Elision is attempted if the
.Fa LOCK_PREDICATE .Fa LOCK_PREDICATE
function returns false. If function returns false. If
.Fa LOCK_PREDICATE .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 operation is aborted. If RTM is unsupported
(no CK_F_PR_RTM macro) then (no CK_F_PR_RTM macro) then
.Fn CK_ELIDE_TRYLOCK .Fn CK_ELIDE_TRYLOCK

@ -46,7 +46,7 @@ function will defer the execution of the function pointed to by
until a grace-period has been detected in until a grace-period has been detected in
.Fa epoch . .Fa epoch .
The function will be provided The function will be provided
the pointer specified by the pointer specified by
.Fa entry . .Fa entry .
The function will execute at some time in the future via calls to The function will execute at some time in the future via calls to
.Fn ck_epoch_reclaim 3 , .Fn ck_epoch_reclaim 3 ,

@ -52,7 +52,7 @@ is undefined if
.Fa epoch .Fa epoch
is not a pointer to a is not a pointer to a
.Tn ck_epoch_t .Tn ck_epoch_t
object. object.
.El .El
.Sh SEE ALSO .Sh SEE ALSO
.Xr ck_epoch_register 3 , .Xr ck_epoch_register 3 ,

@ -57,7 +57,7 @@ was successful then the key specified by
was successfully stored in the hash set pointed to by was successfully stored in the hash set pointed to by
.Fa hs . .Fa hs .
The key must already exist in the hash set, and is The key must already exist in the hash set, and is
replaced by replaced by
.Fa key .Fa key
and the previous value is stored into the void pointer and the previous value is stored into the void pointer
pointed to by the pointed to by the
@ -75,7 +75,7 @@ Behavior is undefined if
.Fa key .Fa key
or or
.Fa hs .Fa hs
are uninitialized. are uninitialized.
.Sh SEE ALSO .Sh SEE ALSO
.Xr ck_hs_init 3 , .Xr ck_hs_init 3 ,
.Xr ck_hs_move 3 , .Xr ck_hs_move 3 ,

@ -38,7 +38,7 @@ Concurrency Kit (libck, \-lck)
.Sh DESCRIPTION .Sh DESCRIPTION
The The
.Fn ck_hs_move 3 .Fn ck_hs_move 3
function will initialize function will initialize
.Fa source .Fa source
from from
.Fa destination . .Fa destination .

@ -33,7 +33,7 @@
Concurrency Kit (libck, \-lck) Concurrency Kit (libck, \-lck)
.Sh SYNOPSIS .Sh SYNOPSIS
.In ck_hs.h .In ck_hs.h
.Ft bool .Ft bool
.Fn ck_hs_next "ck_hs_t *hs" "ck_hs_iterator_t *iterator" "void **entry" .Fn ck_hs_next "ck_hs_t *hs" "ck_hs_iterator_t *iterator" "void **entry"
.Sh DESCRIPTION .Sh DESCRIPTION
The The

@ -57,7 +57,7 @@ was successful then the key specified by
was successfully stored in the hash set pointed to by was successfully stored in the hash set pointed to by
.Fa hs . .Fa hs .
If the key already exists in the hash set, then it is If the key already exists in the hash set, then it is
replaced by replaced by
.Fa key .Fa key
and the previous value is stored into the void pointer and the previous value is stored into the void pointer
pointed to by the pointed to by the

@ -38,7 +38,7 @@ ck_pr.h provides an interface to volatile atomic instructions,
memory barriers and busy-wait facilities as provided by the memory barriers and busy-wait facilities as provided by the
underlying processor. The presence of an atomic operation underlying processor. The presence of an atomic operation
is detected by the presence of a corresponding CK_F_PR macro. 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 .Xr ck_pr_add_16 3
would be determined by the presence of CK_F_PR_ADD_16. would be determined by the presence of CK_F_PR_ADD_16.
.Sh SEE ALSO .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_faa 3 ,
.Xr ck_pr_inc 3 , .Xr ck_pr_inc 3 ,
.Xr ck_pr_dec 3 , .Xr ck_pr_dec 3 ,
.Xr ck_pr_neg 3 , .Xr ck_pr_neg 3 ,
.Xr ck_pr_not 3 , .Xr ck_pr_not 3 ,
.Xr ck_pr_add 3 , .Xr ck_pr_add 3 ,
.Xr ck_pr_sub 3 , .Xr ck_pr_sub 3 ,

@ -60,7 +60,7 @@ Concurrency Kit (libck, \-lck)
.Ft void .Ft void
.Fn ck_pr_add_8 "uint8_t *target" "uint8_t delta" .Fn ck_pr_add_8 "uint8_t *target" "uint8_t delta"
.Sh DESCRIPTION .Sh DESCRIPTION
The The
.Fn ck_pr_add 3 .Fn ck_pr_add 3
family of functions atomically add the value specified by family of functions atomically add the value specified by
.Fa delta .Fa delta
@ -79,7 +79,7 @@ This family of functions does not have a return value.
.Xr ck_pr_faa 3 , .Xr ck_pr_faa 3 ,
.Xr ck_pr_inc 3 , .Xr ck_pr_inc 3 ,
.Xr ck_pr_dec 3 , .Xr ck_pr_dec 3 ,
.Xr ck_pr_neg 3 , .Xr ck_pr_neg 3 ,
.Xr ck_pr_not 3 , .Xr ck_pr_not 3 ,
.Xr ck_pr_sub 3 , .Xr ck_pr_sub 3 ,
.Xr ck_pr_and 3 , .Xr ck_pr_and 3 ,

@ -57,9 +57,9 @@ Concurrency Kit (libck, \-lck)
.Ft void .Ft void
.Fn ck_pr_and_8 "uint8_t *target" "uint8_t delta" .Fn ck_pr_and_8 "uint8_t *target" "uint8_t delta"
.Sh DESCRIPTION .Sh DESCRIPTION
The The
.Fn ck_pr_and 3 .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 result of a bitwise-and of the value pointed to by
.Fa target .Fa target
and and
@ -79,7 +79,7 @@ This family of functions does not have a return value.
.Xr ck_pr_faa 3 , .Xr ck_pr_faa 3 ,
.Xr ck_pr_inc 3 , .Xr ck_pr_inc 3 ,
.Xr ck_pr_dec 3 , .Xr ck_pr_dec 3 ,
.Xr ck_pr_neg 3 , .Xr ck_pr_neg 3 ,
.Xr ck_pr_not 3 , .Xr ck_pr_not 3 ,
.Xr ck_pr_add 3 , .Xr ck_pr_add 3 ,
.Xr ck_pr_sub 3 , .Xr ck_pr_sub 3 ,

@ -36,7 +36,7 @@ Concurrency Kit (libck, \-lck)
.Ft void .Ft void
.Fn ck_pr_barrier void .Fn ck_pr_barrier void
.Sh DESCRIPTION .Sh DESCRIPTION
The The
.Fn ck_pr_barrier 3 .Fn ck_pr_barrier 3
function is used to disable code movement optimizations function is used to disable code movement optimizations
across the invocation of the function. across the invocation of the function.
@ -51,7 +51,7 @@ across the invocation of the function.
.Xr ck_pr_faa 3 , .Xr ck_pr_faa 3 ,
.Xr ck_pr_inc 3 , .Xr ck_pr_inc 3 ,
.Xr ck_pr_dec 3 , .Xr ck_pr_dec 3 ,
.Xr ck_pr_neg 3 , .Xr ck_pr_neg 3 ,
.Xr ck_pr_not 3 , .Xr ck_pr_not 3 ,
.Xr ck_pr_add 3 , .Xr ck_pr_add 3 ,
.Xr ck_pr_sub 3 , .Xr ck_pr_sub 3 ,

@ -51,13 +51,13 @@ Concurrency Kit (libck, \-lck)
.Ft bool .Ft bool
.Fn ck_pr_btc_16 "uint16_t *target" "unsigned int bit_index" .Fn ck_pr_btc_16 "uint16_t *target" "unsigned int bit_index"
.Sh DESCRIPTION .Sh DESCRIPTION
The The
.Fn ck_pr_btc 3 .Fn ck_pr_btc 3
family of functions atomically fetch the value family of functions atomically fetch the value
of the bit in of the bit in
.Fa target .Fa target
at index at index
.Fa bit_index .Fa bit_index
and set that bit to its complement. and set that bit to its complement.
.Sh RETURN VALUES .Sh RETURN VALUES
These family of functions return the original value of 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_faa 3 ,
.Xr ck_pr_inc 3 , .Xr ck_pr_inc 3 ,
.Xr ck_pr_dec 3 , .Xr ck_pr_dec 3 ,
.Xr ck_pr_neg 3 , .Xr ck_pr_neg 3 ,
.Xr ck_pr_not 3 , .Xr ck_pr_not 3 ,
.Xr ck_pr_sub 3 , .Xr ck_pr_sub 3 ,
.Xr ck_pr_and 3 , .Xr ck_pr_and 3 ,

@ -51,13 +51,13 @@ Concurrency Kit (libck, \-lck)
.Ft bool .Ft bool
.Fn ck_pr_btr_16 "uint16_t *target" "unsigned int bit_index" .Fn ck_pr_btr_16 "uint16_t *target" "unsigned int bit_index"
.Sh DESCRIPTION .Sh DESCRIPTION
The The
.Fn ck_pr_btr 3 .Fn ck_pr_btr 3
family of functions atomically fetch the value family of functions atomically fetch the value
of the bit in of the bit in
.Fa target .Fa target
at index at index
.Fa bit_index .Fa bit_index
and set that bit to 0. and set that bit to 0.
.Sh RETURN VALUES .Sh RETURN VALUES
This family of functions returns the original value of 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_faa 3 ,
.Xr ck_pr_inc 3 , .Xr ck_pr_inc 3 ,
.Xr ck_pr_dec 3 , .Xr ck_pr_dec 3 ,
.Xr ck_pr_neg 3 , .Xr ck_pr_neg 3 ,
.Xr ck_pr_not 3 , .Xr ck_pr_not 3 ,
.Xr ck_pr_sub 3 , .Xr ck_pr_sub 3 ,
.Xr ck_pr_and 3 , .Xr ck_pr_and 3 ,

@ -51,13 +51,13 @@ Concurrency Kit (libck, \-lck)
.Ft bool .Ft bool
.Fn ck_pr_bts_16 "uint16_t *target" "unsigned int bit_index" .Fn ck_pr_bts_16 "uint16_t *target" "unsigned int bit_index"
.Sh DESCRIPTION .Sh DESCRIPTION
The The
.Fn ck_pr_bts 3 .Fn ck_pr_bts 3
family of functions atomically fetch the value family of functions atomically fetch the value
of the bit in of the bit in
.Fa target .Fa target
at index at index
.Fa bit_index .Fa bit_index
and set that bit to 1. and set that bit to 1.
.Sh RETURN VALUES .Sh RETURN VALUES
This family of functions returns the original value of 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_faa 3 ,
.Xr ck_pr_inc 3 , .Xr ck_pr_inc 3 ,
.Xr ck_pr_dec 3 , .Xr ck_pr_dec 3 ,
.Xr ck_pr_neg 3 , .Xr ck_pr_neg 3 ,
.Xr ck_pr_not 3 , .Xr ck_pr_not 3 ,
.Xr ck_pr_sub 3 , .Xr ck_pr_sub 3 ,
.Xr ck_pr_and 3 , .Xr ck_pr_and 3 ,

@ -99,9 +99,9 @@ Concurrency Kit (libck, \-lck)
.Ft bool .Ft bool
.Fn ck_pr_cas_8_value "uint8_t *target" "uint8_t old_value" "uint8_t new_value" "uint8_t *original_value" .Fn ck_pr_cas_8_value "uint8_t *target" "uint8_t old_value" "uint8_t new_value" "uint8_t *original_value"
.Sh DESCRIPTION .Sh DESCRIPTION
The The
.Fn ck_pr_cas 3 .Fn ck_pr_cas 3
family of functions atomically compare the value in family of functions atomically compare the value in
.Fa target .Fa target
for equality with for equality with
.Fa old_value .Fa old_value
@ -133,7 +133,7 @@ return false.
.Xr ck_pr_faa 3 , .Xr ck_pr_faa 3 ,
.Xr ck_pr_inc 3 , .Xr ck_pr_inc 3 ,
.Xr ck_pr_dec 3 , .Xr ck_pr_dec 3 ,
.Xr ck_pr_neg 3 , .Xr ck_pr_neg 3 ,
.Xr ck_pr_not 3 , .Xr ck_pr_not 3 ,
.Xr ck_pr_sub 3 , .Xr ck_pr_sub 3 ,
.Xr ck_pr_and 3 , .Xr ck_pr_and 3 ,

@ -87,7 +87,7 @@ Concurrency Kit (libck, \-lck)
.Ft void .Ft void
.Fn ck_pr_dec_8_zero "uint8_t *target" "bool *z" .Fn ck_pr_dec_8_zero "uint8_t *target" "bool *z"
.Sh DESCRIPTION .Sh DESCRIPTION
The The
.Fn ck_pr_dec 3 .Fn ck_pr_dec 3
family of functions atomically decrement the value pointed to family of functions atomically decrement the value pointed to
by by
@ -109,7 +109,7 @@ to false otherwise.
.Xr ck_pr_fas 3 , .Xr ck_pr_fas 3 ,
.Xr ck_pr_faa 3 , .Xr ck_pr_faa 3 ,
.Xr ck_pr_inc 3 , .Xr ck_pr_inc 3 ,
.Xr ck_pr_neg 3 , .Xr ck_pr_neg 3 ,
.Xr ck_pr_not 3 , .Xr ck_pr_not 3 ,
.Xr ck_pr_add 3 , .Xr ck_pr_add 3 ,
.Xr ck_pr_sub 3 , .Xr ck_pr_sub 3 ,

@ -60,7 +60,7 @@ Concurrency Kit (libck, \-lck)
.Ft uint8_t .Ft uint8_t
.Fn ck_pr_faa_8 "uint8_t *target" "uint8_t delta" .Fn ck_pr_faa_8 "uint8_t *target" "uint8_t delta"
.Sh DESCRIPTION .Sh DESCRIPTION
The The
.Fn ck_pr_faa 3 .Fn ck_pr_faa 3
family of functions atomically fetch the value pointed to family of functions atomically fetch the value pointed to
by by
@ -84,7 +84,7 @@ addition operation is applied.
.Xr ck_pr_fas 3 , .Xr ck_pr_fas 3 ,
.Xr ck_pr_inc 3 , .Xr ck_pr_inc 3 ,
.Xr ck_pr_dec 3 , .Xr ck_pr_dec 3 ,
.Xr ck_pr_neg 3 , .Xr ck_pr_neg 3 ,
.Xr ck_pr_not 3 , .Xr ck_pr_not 3 ,
.Xr ck_pr_add 3 , .Xr ck_pr_add 3 ,
.Xr ck_pr_sub 3 , .Xr ck_pr_sub 3 ,

@ -60,7 +60,7 @@ Concurrency Kit (libck, \-lck)
.Ft uint8_t .Ft uint8_t
.Fn ck_pr_fas_8 "uint8_t *target" "uint8_t new_value" .Fn ck_pr_fas_8 "uint8_t *target" "uint8_t new_value"
.Sh DESCRIPTION .Sh DESCRIPTION
The The
.Fn ck_pr_fas 3 .Fn ck_pr_fas 3
family of functions atomically fetch the value pointed to family of functions atomically fetch the value pointed to
by by
@ -85,7 +85,7 @@ atomically replaced with
.Xr ck_pr_faa 3 , .Xr ck_pr_faa 3 ,
.Xr ck_pr_inc 3 , .Xr ck_pr_inc 3 ,
.Xr ck_pr_dec 3 , .Xr ck_pr_dec 3 ,
.Xr ck_pr_neg 3 , .Xr ck_pr_neg 3 ,
.Xr ck_pr_not 3 , .Xr ck_pr_not 3 ,
.Xr ck_pr_add 3 , .Xr ck_pr_add 3 ,
.Xr ck_pr_sub 3 , .Xr ck_pr_sub 3 ,

@ -57,7 +57,7 @@ This function has no return value.
.Xr ck_pr_faa 3 , .Xr ck_pr_faa 3 ,
.Xr ck_pr_inc 3 , .Xr ck_pr_inc 3 ,
.Xr ck_pr_dec 3 , .Xr ck_pr_dec 3 ,
.Xr ck_pr_neg 3 , .Xr ck_pr_neg 3 ,
.Xr ck_pr_not 3 , .Xr ck_pr_not 3 ,
.Xr ck_pr_add 3 , .Xr ck_pr_add 3 ,
.Xr ck_pr_sub 3 , .Xr ck_pr_sub 3 ,

@ -25,7 +25,7 @@
.\" .\"
.\" .\"
.Dd May 16, 2013 .Dd May 16, 2013
.Dt CK_PR_FENCE_ATOMIC 3 .Dt CK_PR_FENCE_ATOMIC 3
.Sh NAME .Sh NAME
.Nm ck_pr_fence_atomic .Nm ck_pr_fence_atomic
.Nd enforce partial ordering of atomic read-modify-write operations .Nd enforce partial ordering of atomic read-modify-write operations
@ -38,9 +38,9 @@ Concurrency Kit (libck, \-lck)
.Ft void .Ft void
.Fn ck_pr_fence_strict_atomic void .Fn ck_pr_fence_strict_atomic void
.Sh DESCRIPTION .Sh DESCRIPTION
The The
.Fn ck_pr_fence_atomic .Fn ck_pr_fence_atomic
function enfores the ordering of any function enfores the ordering of any
atomic read-modify-write operations relative to atomic read-modify-write operations relative to
the invocation of the function. This function the invocation of the function. This function
always serve as an implicit compiler barrier. On 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_faa 3 ,
.Xr ck_pr_inc 3 , .Xr ck_pr_inc 3 ,
.Xr ck_pr_dec 3 , .Xr ck_pr_dec 3 ,
.Xr ck_pr_neg 3 , .Xr ck_pr_neg 3 ,
.Xr ck_pr_not 3 , .Xr ck_pr_not 3 ,
.Xr ck_pr_add 3 , .Xr ck_pr_add 3 ,
.Xr ck_pr_sub 3 , .Xr ck_pr_sub 3 ,

@ -25,7 +25,7 @@
.\" .\"
.\" .\"
.Dd May 16, 2013 .Dd May 16, 2013
.Dt CK_PR_FENCE_ATOMIC_LOAD 3 .Dt CK_PR_FENCE_ATOMIC_LOAD 3
.Sh NAME .Sh NAME
.Nm ck_pr_fence_atomic_load .Nm ck_pr_fence_atomic_load
.Nd enforce ordering of atomic read-modify-write operations to load operations .Nd enforce ordering of atomic read-modify-write operations to load operations
@ -38,9 +38,9 @@ Concurrency Kit (libck, \-lck)
.Ft void .Ft void
.Fn ck_pr_fence_strict_atomic_load void .Fn ck_pr_fence_strict_atomic_load void
.Sh DESCRIPTION .Sh DESCRIPTION
The The
.Fn ck_pr_fence_atomic_load .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 atomic read-modify-write operations relative to
any load operations following the function invocation. This function any load operations following the function invocation. This function
always serve as an implicit compiler barrier. On 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_faa 3 ,
.Xr ck_pr_inc 3 , .Xr ck_pr_inc 3 ,
.Xr ck_pr_dec 3 , .Xr ck_pr_dec 3 ,
.Xr ck_pr_neg 3 , .Xr ck_pr_neg 3 ,
.Xr ck_pr_not 3 , .Xr ck_pr_not 3 ,
.Xr ck_pr_add 3 , .Xr ck_pr_add 3 ,
.Xr ck_pr_sub 3 , .Xr ck_pr_sub 3 ,

@ -25,7 +25,7 @@
.\" .\"
.\" .\"
.Dd May 16, 2013 .Dd May 16, 2013
.Dt CK_PR_FENCE_ATOMIC_STORE 3 .Dt CK_PR_FENCE_ATOMIC_STORE 3
.Sh NAME .Sh NAME
.Nm ck_pr_fence_atomic_store .Nm ck_pr_fence_atomic_store
.Nd enforce ordering of atomic read-modify-write operations to store operations .Nd enforce ordering of atomic read-modify-write operations to store operations
@ -38,9 +38,9 @@ Concurrency Kit (libck, \-lck)
.Ft void .Ft void
.Fn ck_pr_fence_strict_atomic_store void .Fn ck_pr_fence_strict_atomic_store void
.Sh DESCRIPTION .Sh DESCRIPTION
The The
.Fn ck_pr_fence_atomic_store .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 atomic read-modify-write operations relative to
any load operations following the function invocation. This function any load operations following the function invocation. This function
always serve as an implicit compiler barrier. On 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_faa 3 ,
.Xr ck_pr_inc 3 , .Xr ck_pr_inc 3 ,
.Xr ck_pr_dec 3 , .Xr ck_pr_dec 3 ,
.Xr ck_pr_neg 3 , .Xr ck_pr_neg 3 ,
.Xr ck_pr_not 3 , .Xr ck_pr_not 3 ,
.Xr ck_pr_add 3 , .Xr ck_pr_add 3 ,
.Xr ck_pr_sub 3 , .Xr ck_pr_sub 3 ,

@ -98,7 +98,7 @@ This function has no return value.
.Xr ck_pr_faa 3 , .Xr ck_pr_faa 3 ,
.Xr ck_pr_inc 3 , .Xr ck_pr_inc 3 ,
.Xr ck_pr_dec 3 , .Xr ck_pr_dec 3 ,
.Xr ck_pr_neg 3 , .Xr ck_pr_neg 3 ,
.Xr ck_pr_not 3 , .Xr ck_pr_not 3 ,
.Xr ck_pr_add 3 , .Xr ck_pr_add 3 ,
.Xr ck_pr_sub 3 , .Xr ck_pr_sub 3 ,

@ -98,7 +98,7 @@ This function has no return value.
.Xr ck_pr_faa 3 , .Xr ck_pr_faa 3 ,
.Xr ck_pr_inc 3 , .Xr ck_pr_inc 3 ,
.Xr ck_pr_dec 3 , .Xr ck_pr_dec 3 ,
.Xr ck_pr_neg 3 , .Xr ck_pr_neg 3 ,
.Xr ck_pr_not 3 , .Xr ck_pr_not 3 ,
.Xr ck_pr_add 3 , .Xr ck_pr_add 3 ,
.Xr ck_pr_sub 3 , .Xr ck_pr_sub 3 ,

@ -36,7 +36,7 @@ Concurrency Kit (libck, \-lck)
.Ft void .Ft void
.Fn ck_pr_fence_load_depends void .Fn ck_pr_fence_load_depends void
.Sh DESCRIPTION .Sh DESCRIPTION
The The
.Fn ck_pr_fence_load_depends 3 .Fn ck_pr_fence_load_depends 3
emits necessary fences for pure data-dependent loads. It currently only serves as a compiler 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 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_faa 3 ,
.Xr ck_pr_inc 3 , .Xr ck_pr_inc 3 ,
.Xr ck_pr_dec 3 , .Xr ck_pr_dec 3 ,
.Xr ck_pr_neg 3 , .Xr ck_pr_neg 3 ,
.Xr ck_pr_not 3 , .Xr ck_pr_not 3 ,
.Xr ck_pr_add 3 , .Xr ck_pr_add 3 ,
.Xr ck_pr_sub 3 , .Xr ck_pr_sub 3 ,

@ -98,7 +98,7 @@ This function has no return value.
.Xr ck_pr_faa 3 , .Xr ck_pr_faa 3 ,
.Xr ck_pr_inc 3 , .Xr ck_pr_inc 3 ,
.Xr ck_pr_dec 3 , .Xr ck_pr_dec 3 ,
.Xr ck_pr_neg 3 , .Xr ck_pr_neg 3 ,
.Xr ck_pr_not 3 , .Xr ck_pr_not 3 ,
.Xr ck_pr_add 3 , .Xr ck_pr_add 3 ,
.Xr ck_pr_sub 3 , .Xr ck_pr_sub 3 ,

@ -38,7 +38,7 @@ Concurrency Kit (libck, \-lck)
.Ft void .Ft void
.Fn ck_pr_fence_strict_memory .Fn ck_pr_fence_strict_memory
.Sh DESCRIPTION .Sh DESCRIPTION
The The
.Fn ck_pr_fence_memory 3 .Fn ck_pr_fence_memory 3
function enforces the ordering of any memory operations function enforces the ordering of any memory operations
with respect to the invocation of the function. This function 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_faa 3 ,
.Xr ck_pr_inc 3 , .Xr ck_pr_inc 3 ,
.Xr ck_pr_dec 3 , .Xr ck_pr_dec 3 ,
.Xr ck_pr_neg 3 , .Xr ck_pr_neg 3 ,
.Xr ck_pr_not 3 , .Xr ck_pr_not 3 ,
.Xr ck_pr_add 3 , .Xr ck_pr_add 3 ,
.Xr ck_pr_sub 3 , .Xr ck_pr_sub 3 ,

@ -56,7 +56,7 @@ This function has no return value.
.Xr ck_pr_faa 3 , .Xr ck_pr_faa 3 ,
.Xr ck_pr_inc 3 , .Xr ck_pr_inc 3 ,
.Xr ck_pr_dec 3 , .Xr ck_pr_dec 3 ,
.Xr ck_pr_neg 3 , .Xr ck_pr_neg 3 ,
.Xr ck_pr_not 3 , .Xr ck_pr_not 3 ,
.Xr ck_pr_add 3 , .Xr ck_pr_add 3 ,
.Xr ck_pr_sub 3 , .Xr ck_pr_sub 3 ,

@ -38,7 +38,7 @@ Concurrency Kit (libck, \-lck)
.Ft void .Ft void
.Fn ck_pr_fence_strict_store void .Fn ck_pr_fence_strict_store void
.Sh DESCRIPTION .Sh DESCRIPTION
The The
.Fn ck_pr_fence_store .Fn ck_pr_fence_store
function enfores the ordering of any memory store, function enfores the ordering of any memory store,
.Fn ck_pr_store .Fn ck_pr_store
@ -97,7 +97,7 @@ This function has no return value.
.Xr ck_pr_faa 3 , .Xr ck_pr_faa 3 ,
.Xr ck_pr_inc 3 , .Xr ck_pr_inc 3 ,
.Xr ck_pr_dec 3 , .Xr ck_pr_dec 3 ,
.Xr ck_pr_neg 3 , .Xr ck_pr_neg 3 ,
.Xr ck_pr_not 3 , .Xr ck_pr_not 3 ,
.Xr ck_pr_add 3 , .Xr ck_pr_add 3 ,
.Xr ck_pr_sub 3 , .Xr ck_pr_sub 3 ,

@ -38,13 +38,13 @@ Concurrency Kit (libck, \-lck)
.Ft void .Ft void
.Fn ck_pr_fence_strict_store_atomic void .Fn ck_pr_fence_strict_store_atomic void
.Sh DESCRIPTION .Sh DESCRIPTION
The The
.Fn ck_pr_fence_store_atomic .Fn ck_pr_fence_store_atomic
function enfores the ordering of any memory store, function enfores the ordering of any memory store,
.Fn ck_pr_store .Fn ck_pr_store
and atomic read-modify-write operations to atomic read-modify-write and atomic read-modify-write operations to atomic read-modify-write
operations relative to the invocation of the function. This function 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 This functions will emit a fence for PSO and RMO
targets. In order to force the emission of a fence use the targets. In order to force the emission of a fence use the
.Fn ck_pr_fence_strict_store_atomic .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_faa 3 ,
.Xr ck_pr_inc 3 , .Xr ck_pr_inc 3 ,
.Xr ck_pr_dec 3 , .Xr ck_pr_dec 3 ,
.Xr ck_pr_neg 3 , .Xr ck_pr_neg 3 ,
.Xr ck_pr_not 3 , .Xr ck_pr_not 3 ,
.Xr ck_pr_add 3 , .Xr ck_pr_add 3 ,
.Xr ck_pr_sub 3 , .Xr ck_pr_sub 3 ,

@ -38,13 +38,13 @@ Concurrency Kit (libck, \-lck)
.Ft void .Ft void
.Fn ck_pr_fence_strict_store_load void .Fn ck_pr_fence_strict_store_load void
.Sh DESCRIPTION .Sh DESCRIPTION
The The
.Fn ck_pr_fence_store_load .Fn ck_pr_fence_store_load
function enfores the ordering of any memory store, function enfores the ordering of any memory store,
.Fn ck_pr_store .Fn ck_pr_store
and atomic read-modify-write operations to load and atomic read-modify-write operations to load
operations relative to the invocation of the function. This function 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 A fence will currently always be emitted for this
operation, including for TSO memory model targets. operation, including for TSO memory model targets.
.Sh EXAMPLE .Sh EXAMPLE
@ -92,7 +92,7 @@ This function has no return value.
.Xr ck_pr_faa 3 , .Xr ck_pr_faa 3 ,
.Xr ck_pr_inc 3 , .Xr ck_pr_inc 3 ,
.Xr ck_pr_dec 3 , .Xr ck_pr_dec 3 ,
.Xr ck_pr_neg 3 , .Xr ck_pr_neg 3 ,
.Xr ck_pr_not 3 , .Xr ck_pr_not 3 ,
.Xr ck_pr_add 3 , .Xr ck_pr_add 3 ,
.Xr ck_pr_sub 3 , .Xr ck_pr_sub 3 ,

@ -87,7 +87,7 @@ Concurrency Kit (libck, \-lck)
.Ft void .Ft void
.Fn ck_pr_inc_8_zero "uint8_t *target" "bool *z" .Fn ck_pr_inc_8_zero "uint8_t *target" "bool *z"
.Sh DESCRIPTION .Sh DESCRIPTION
The The
.Fn ck_pr_inc 3 .Fn ck_pr_inc 3
family of functions atomically increment the value pointed to family of functions atomically increment the value pointed to
by by
@ -109,7 +109,7 @@ false otherwise.
.Xr ck_pr_fas 3 , .Xr ck_pr_fas 3 ,
.Xr ck_pr_faa 3 , .Xr ck_pr_faa 3 ,
.Xr ck_pr_dec 3 , .Xr ck_pr_dec 3 ,
.Xr ck_pr_neg 3 , .Xr ck_pr_neg 3 ,
.Xr ck_pr_not 3 , .Xr ck_pr_not 3 ,
.Xr ck_pr_add 3 , .Xr ck_pr_add 3 ,
.Xr ck_pr_sub 3 , .Xr ck_pr_sub 3 ,

@ -60,7 +60,7 @@ Concurrency Kit (libck, \-lck)
.Ft uint8_t .Ft uint8_t
.Fn ck_pr_load_8 "const uint8_t *target" .Fn ck_pr_load_8 "const uint8_t *target"
.Sh DESCRIPTION .Sh DESCRIPTION
The The
.Fn ck_pr_load 3 .Fn ck_pr_load 3
family of functions atomically loads the value family of functions atomically loads the value
pointed to by pointed to by
@ -82,7 +82,7 @@ in the location pointed to by the first argument.
.Xr ck_pr_faa 3 , .Xr ck_pr_faa 3 ,
.Xr ck_pr_inc 3 , .Xr ck_pr_inc 3 ,
.Xr ck_pr_dec 3 , .Xr ck_pr_dec 3 ,
.Xr ck_pr_neg 3 , .Xr ck_pr_neg 3 ,
.Xr ck_pr_not 3 , .Xr ck_pr_not 3 ,
.Xr ck_pr_sub 3 , .Xr ck_pr_sub 3 ,
.Xr ck_pr_and 3 , .Xr ck_pr_and 3 ,

@ -87,7 +87,7 @@ Concurrency Kit (libck, \-lck)
.Ft void .Ft void
.Fn ck_pr_neg_8_zero "uint8_t *target" "bool *z" .Fn ck_pr_neg_8_zero "uint8_t *target" "bool *z"
.Sh DESCRIPTION .Sh DESCRIPTION
The The
.Fn ck_pr_neg 3 .Fn ck_pr_neg 3
family of functions atomically negate the value pointed to family of functions atomically negate the value pointed to
by by
@ -107,7 +107,7 @@ pointed to value to false otherwise.
.Xr ck_pr_fas 3 , .Xr ck_pr_fas 3 ,
.Xr ck_pr_faa 3 , .Xr ck_pr_faa 3 ,
.Xr ck_pr_inc 3 , .Xr ck_pr_inc 3 ,
.Xr ck_pr_dec 3 , .Xr ck_pr_dec 3 ,
.Xr ck_pr_not 3 , .Xr ck_pr_not 3 ,
.Xr ck_pr_add 3 , .Xr ck_pr_add 3 ,
.Xr ck_pr_sub 3 , .Xr ck_pr_sub 3 ,

@ -60,7 +60,7 @@ Concurrency Kit (libck, \-lck)
.Ft void .Ft void
.Fn ck_pr_not_8 "uint8_t *target" .Fn ck_pr_not_8 "uint8_t *target"
.Sh DESCRIPTION .Sh DESCRIPTION
The The
.Fn ck_pr_not 3 .Fn ck_pr_not 3
family of functions atomically complement the value pointed to family of functions atomically complement the value pointed to
by by
@ -78,7 +78,7 @@ These functions have no return value.
.Xr ck_pr_faa 3 , .Xr ck_pr_faa 3 ,
.Xr ck_pr_inc 3 , .Xr ck_pr_inc 3 ,
.Xr ck_pr_not 3 , .Xr ck_pr_not 3 ,
.Xr ck_pr_neg 3 , .Xr ck_pr_neg 3 ,
.Xr ck_pr_add 3 , .Xr ck_pr_add 3 ,
.Xr ck_pr_sub 3 , .Xr ck_pr_sub 3 ,
.Xr ck_pr_and 3 , .Xr ck_pr_and 3 ,

@ -57,9 +57,9 @@ Concurrency Kit (libck, \-lck)
.Ft void .Ft void
.Fn ck_pr_or_8 "uint8_t *target" "uint8_t delta" .Fn ck_pr_or_8 "uint8_t *target" "uint8_t delta"
.Sh DESCRIPTION .Sh DESCRIPTION
The The
.Fn ck_pr_or 3 .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 result of a bitwise-or of the value pointed to by
.Fa target .Fa target
and and
@ -79,7 +79,7 @@ This family of functions does not have a return value.
.Xr ck_pr_faa 3 , .Xr ck_pr_faa 3 ,
.Xr ck_pr_inc 3 , .Xr ck_pr_inc 3 ,
.Xr ck_pr_dec 3 , .Xr ck_pr_dec 3 ,
.Xr ck_pr_neg 3 , .Xr ck_pr_neg 3 ,
.Xr ck_pr_not 3 , .Xr ck_pr_not 3 ,
.Xr ck_pr_add 3 , .Xr ck_pr_add 3 ,
.Xr ck_pr_sub 3 , .Xr ck_pr_sub 3 ,

@ -98,7 +98,7 @@ set manuals.
.Xr ck_pr_faa 3 , .Xr ck_pr_faa 3 ,
.Xr ck_pr_inc 3 , .Xr ck_pr_inc 3 ,
.Xr ck_pr_dec 3 , .Xr ck_pr_dec 3 ,
.Xr ck_pr_neg 3 , .Xr ck_pr_neg 3 ,
.Xr ck_pr_not 3 , .Xr ck_pr_not 3 ,
.Xr ck_pr_sub 3 , .Xr ck_pr_sub 3 ,
.Xr ck_pr_and 3 , .Xr ck_pr_and 3 ,

@ -36,9 +36,9 @@ Concurrency Kit (libck, \-lck)
.Ft void .Ft void
.Fn ck_pr_stall void .Fn ck_pr_stall void
.Sh DESCRIPTION .Sh DESCRIPTION
The The
.Fn ck_pr_stall 3 .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 not only serves as a compiler barrier, but on some architectures
it emits cycle-saving instructions. it emits cycle-saving instructions.
.Sh EXAMPLE .Sh EXAMPLE
@ -71,7 +71,7 @@ function(void)
.Xr ck_pr_faa 3 , .Xr ck_pr_faa 3 ,
.Xr ck_pr_inc 3 , .Xr ck_pr_inc 3 ,
.Xr ck_pr_dec 3 , .Xr ck_pr_dec 3 ,
.Xr ck_pr_neg 3 , .Xr ck_pr_neg 3 ,
.Xr ck_pr_not 3 , .Xr ck_pr_not 3 ,
.Xr ck_pr_add 3 , .Xr ck_pr_add 3 ,
.Xr ck_pr_sub 3 , .Xr ck_pr_sub 3 ,

@ -60,7 +60,7 @@ Concurrency Kit (libck, \-lck)
.Ft void .Ft void
.Fn ck_pr_store_8 "uint8_t *target" "uint8_t value" .Fn ck_pr_store_8 "uint8_t *target" "uint8_t value"
.Sh DESCRIPTION .Sh DESCRIPTION
The The
.Fn ck_pr_store 3 .Fn ck_pr_store 3
family of functions atomically stores the value specified family of functions atomically stores the value specified
by by
@ -82,7 +82,7 @@ This family of functions has no return value.
.Xr ck_pr_faa 3 , .Xr ck_pr_faa 3 ,
.Xr ck_pr_inc 3 , .Xr ck_pr_inc 3 ,
.Xr ck_pr_dec 3 , .Xr ck_pr_dec 3 ,
.Xr ck_pr_neg 3 , .Xr ck_pr_neg 3 ,
.Xr ck_pr_not 3 , .Xr ck_pr_not 3 ,
.Xr ck_pr_sub 3 , .Xr ck_pr_sub 3 ,
.Xr ck_pr_and 3 , .Xr ck_pr_and 3 ,

@ -60,7 +60,7 @@ Concurrency Kit (libck, \-lck)
.Ft void .Ft void
.Fn ck_pr_sub_8 "uint8_t *target" "uint8_t delta" .Fn ck_pr_sub_8 "uint8_t *target" "uint8_t delta"
.Sh DESCRIPTION .Sh DESCRIPTION
The The
.Fn ck_pr_sub 3 .Fn ck_pr_sub 3
family of functions atomically subtract the value specified by family of functions atomically subtract the value specified by
.Fa delta .Fa delta
@ -79,7 +79,7 @@ This family of functions does not have a return value.
.Xr ck_pr_faa 3 , .Xr ck_pr_faa 3 ,
.Xr ck_pr_inc 3 , .Xr ck_pr_inc 3 ,
.Xr ck_pr_dec 3 , .Xr ck_pr_dec 3 ,
.Xr ck_pr_neg 3 , .Xr ck_pr_neg 3 ,
.Xr ck_pr_not 3 , .Xr ck_pr_not 3 ,
.Xr ck_pr_add 3 , .Xr ck_pr_add 3 ,
.Xr ck_pr_and 3 , .Xr ck_pr_and 3 ,

@ -57,9 +57,9 @@ Concurrency Kit (libck, \-lck)
.Ft void .Ft void
.Fn ck_pr_xor_8 "uint8_t *target" "uint8_t delta" .Fn ck_pr_xor_8 "uint8_t *target" "uint8_t delta"
.Sh DESCRIPTION .Sh DESCRIPTION
The The
.Fn ck_pr_xor 3 .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 result of a bitwise-xor of the value pointed to by
.Fa target .Fa target
and and
@ -79,7 +79,7 @@ This family of functions does not have a return value.
.Xr ck_pr_faa 3 , .Xr ck_pr_faa 3 ,
.Xr ck_pr_inc 3 , .Xr ck_pr_inc 3 ,
.Xr ck_pr_dec 3 , .Xr ck_pr_dec 3 ,
.Xr ck_pr_neg 3 , .Xr ck_pr_neg 3 ,
.Xr ck_pr_not 3 , .Xr ck_pr_not 3 ,
.Xr ck_pr_add 3 , .Xr ck_pr_add 3 ,
.Xr ck_pr_sub 3 , .Xr ck_pr_sub 3 ,

@ -91,7 +91,7 @@ dequeue(void)
} }
/* An empty ring was encountered, leave. */ /* An empty ring was encountered, leave. */
return; return;
} }
.Ed .Ed
.Sh RETURN VALUES .Sh RETURN VALUES

@ -89,7 +89,7 @@ dequeue(void)
} }
/* An empty ring was encountered, leave. */ /* An empty ring was encountered, leave. */
return; return;
} }
.Ed .Ed
.Sh RETURN VALUES .Sh RETURN VALUES

@ -42,7 +42,7 @@ function enqueues the pointer
.Fa entry .Fa entry
into the bounded buffer pointed to by into the bounded buffer pointed to by
.Fa ring .Fa ring
in FIFO fashion. in FIFO fashion.
The buffer pointed to by The buffer pointed to by
.Fa buffer .Fa buffer
must be unique to must be unique to
@ -88,11 +88,11 @@ enqueue(void)
} }
/* Enqueue operation completed successfully. */ /* Enqueue operation completed successfully. */
return; return;
} }
.Ed .Ed
.Sh RETURN VALUES .Sh RETURN VALUES
The function returns true if the value of The function returns true if the value of
.Fa entry .Fa entry
was successfully enqueued into was successfully enqueued into
.Fa ring . .Fa ring .

@ -42,7 +42,7 @@ function enqueues the pointer
.Fa entry .Fa entry
into the bounded buffer pointed to by into the bounded buffer pointed to by
.Fa ring .Fa ring
in FIFO fashion. in FIFO fashion.
The buffer pointed to by The buffer pointed to by
.Fa buffer .Fa buffer
must be unique to must be unique to
@ -96,11 +96,11 @@ enqueue(void)
do_something; do_something;
} }
return; return;
} }
.Ed .Ed
.Sh RETURN VALUES .Sh RETURN VALUES
The function returns true if the value of The function returns true if the value of
.Fa entry .Fa entry
was successfully enqueued into was successfully enqueued into
.Fa ring . .Fa ring .

@ -42,7 +42,7 @@ function enqueues the pointer
.Fa entry .Fa entry
into the bounded buffer pointed to by into the bounded buffer pointed to by
.Fa ring .Fa ring
in FIFO fashion. in FIFO fashion.
The buffer pointed to by The buffer pointed to by
.Fa buffer .Fa buffer
must be unique to must be unique to
@ -86,11 +86,11 @@ enqueue(void)
} }
/* Enqueue operation completed successfully. */ /* Enqueue operation completed successfully. */
return; return;
} }
.Ed .Ed
.Sh RETURN VALUES .Sh RETURN VALUES
The function returns true if the value of The function returns true if the value of
.Fa entry .Fa entry
was successfully enqueued into was successfully enqueued into
.Fa ring . .Fa ring .

@ -42,7 +42,7 @@ function enqueues the pointer
.Fa entry .Fa entry
into the bounded buffer pointed to by into the bounded buffer pointed to by
.Fa ring .Fa ring
in FIFO fashion. in FIFO fashion.
The buffer pointed to by The buffer pointed to by
.Fa buffer .Fa buffer
must be unique to must be unique to
@ -94,11 +94,11 @@ enqueue(void)
do_something; do_something;
} }
return; return;
} }
.Ed .Ed
.Sh RETURN VALUES .Sh RETURN VALUES
The function returns true if the value of The function returns true if the value of
.Fa entry .Fa entry
was successfully enqueued into was successfully enqueued into
.Fa ring . .Fa ring .

@ -71,7 +71,7 @@ in a bounded number of steps. It is
possible for the function to return false even possible for the function to return false even
if if
.Fa ring .Fa ring
is non-empty. This is non-empty. This
.Sh EXAMPLE .Sh EXAMPLE
.Bd -literal -offset indent .Bd -literal -offset indent
#include <ck_ring.h> #include <ck_ring.h>
@ -97,7 +97,7 @@ dequeue(void)
} }
/* An empty ring was encountered, leave. */ /* An empty ring was encountered, leave. */
return; return;
} }
.Ed .Ed
.Sh RETURN VALUES .Sh RETURN VALUES

@ -69,7 +69,7 @@ either the
.Xr CK_COHORT_PROTOTYPE 3 .Xr CK_COHORT_PROTOTYPE 3
or the or the
.Xr CK_COHORT_TRYLOCK_PROTOTYPE 3 .Xr CK_COHORT_TRYLOCK_PROTOTYPE 3
macros, and define a reader-writer lock type using the macros, and define a reader-writer lock type using the
.Xr CK_RWCOHORT_PROTOTYPE 3 .Xr CK_RWCOHORT_PROTOTYPE 3
macro. macro.
.Pp .Pp
@ -161,7 +161,7 @@ main(void)
calloc(n_cohorts, sizeof(CK_COHORT_INSTANCE(test_cohort))); calloc(n_cohorts, sizeof(CK_COHORT_INSTANCE(test_cohort)));
/* create local locks to use with each 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)); calloc(n_cohorts, sizeof(ck_spinlock_t));
pthread_t *threads = pthread_t *threads =

@ -200,7 +200,7 @@ provides a summary of the current implementations.
ck_spinlock_ticket Ticket Centralized None Yes ck_spinlock_ticket Ticket Centralized None Yes
.Ed .Ed
.Pp .Pp
* Hierarchical CLH only offers weak fairness for threads accross cluster * Hierarchical CLH only offers weak fairness for threads accross cluster
nodes. nodes.
.Pp .Pp
If contention is low and there is no hard requirement for starvation-freedom If contention is low and there is no hard requirement for starvation-freedom

Loading…
Cancel
Save