From e0f56ea1135af29ebefd7a69ee8477e71f34e82b Mon Sep 17 00:00:00 2001 From: Samy Al Bahra Date: Mon, 1 Sep 2014 20:14:26 -0400 Subject: [PATCH] whitespace: Whitespace clean-up of manual pages. --- doc/CK_COHORT_INIT | 6 +++--- doc/CK_COHORT_LOCK | 6 +++--- doc/CK_COHORT_PROTOTYPE | 2 +- doc/CK_COHORT_TRYLOCK | 10 +++++----- doc/CK_COHORT_TRYLOCK_PROTOTYPE | 4 ++-- doc/CK_COHORT_UNLOCK | 6 +++--- doc/CK_RWCOHORT_INIT | 4 ++-- doc/CK_RWCOHORT_INSTANCE | 4 ++-- doc/CK_RWCOHORT_PROTOTYPE | 4 ++-- doc/CK_RWCOHORT_READ_LOCK | 18 +++++++++--------- doc/CK_RWCOHORT_READ_UNLOCK | 16 ++++++++-------- doc/CK_RWCOHORT_WRITE_LOCK | 18 +++++++++--------- doc/CK_RWCOHORT_WRITE_UNLOCK | 16 ++++++++-------- doc/ck_cohort | 6 +++--- doc/ck_elide | 4 ++-- doc/ck_epoch_call | 2 +- doc/ck_epoch_init | 2 +- doc/ck_hs_fas | 4 ++-- doc/ck_hs_move | 2 +- doc/ck_hs_next | 2 +- doc/ck_hs_set | 2 +- doc/ck_pr | 4 ++-- doc/ck_pr_add | 4 ++-- doc/ck_pr_and | 6 +++--- doc/ck_pr_barrier | 4 ++-- doc/ck_pr_btc | 6 +++--- doc/ck_pr_btr | 6 +++--- doc/ck_pr_bts | 6 +++--- doc/ck_pr_cas | 6 +++--- doc/ck_pr_dec | 4 ++-- doc/ck_pr_faa | 4 ++-- doc/ck_pr_fas | 4 ++-- doc/ck_pr_fence_acquire | 2 +- doc/ck_pr_fence_atomic | 8 ++++---- doc/ck_pr_fence_atomic_load | 8 ++++---- doc/ck_pr_fence_atomic_store | 8 ++++---- doc/ck_pr_fence_load | 2 +- doc/ck_pr_fence_load_atomic | 2 +- doc/ck_pr_fence_load_depends | 4 ++-- doc/ck_pr_fence_load_store | 2 +- doc/ck_pr_fence_memory | 4 ++-- doc/ck_pr_fence_release | 2 +- doc/ck_pr_fence_store | 4 ++-- doc/ck_pr_fence_store_atomic | 6 +++--- doc/ck_pr_fence_store_load | 6 +++--- doc/ck_pr_inc | 4 ++-- doc/ck_pr_load | 4 ++-- doc/ck_pr_neg | 4 ++-- doc/ck_pr_not | 4 ++-- doc/ck_pr_or | 6 +++--- doc/ck_pr_rtm | 2 +- doc/ck_pr_stall | 6 +++--- doc/ck_pr_store | 4 ++-- doc/ck_pr_sub | 4 ++-- doc/ck_pr_xor | 6 +++--- doc/ck_ring_dequeue_spmc | 2 +- doc/ck_ring_dequeue_spsc | 2 +- doc/ck_ring_enqueue_spmc | 6 +++--- doc/ck_ring_enqueue_spmc_size | 6 +++--- doc/ck_ring_enqueue_spsc | 6 +++--- doc/ck_ring_enqueue_spsc_size | 6 +++--- doc/ck_ring_trydequeue_spmc | 4 ++-- doc/ck_rwcohort | 4 ++-- doc/ck_spinlock | 2 +- 64 files changed, 166 insertions(+), 166 deletions(-) diff --git a/doc/CK_COHORT_INIT b/doc/CK_COHORT_INIT index 42a2294..94454d9 100644 --- a/doc/CK_COHORT_INIT +++ b/doc/CK_COHORT_INIT @@ -38,7 +38,7 @@ Concurrency Kit (libck, \-lck) .Sh DESCRIPTION Until a cohort instance is initialized using the CK_COHORT_INIT macro, any operations involving it will have undefined behavior. After this macro has been called, the cohort -pointed to by the +pointed to by the .Fa cohort argument will use the lock pointed to by .Fa global_lock @@ -48,8 +48,8 @@ as its local lock. .Pp The cohort will relinquish its global lock after .Fa pass_limit -consecutive acquisitions of its local lock, even if there are other threads waiting. -If you are unsure of a value to use for the +consecutive acquisitions of its local lock, even if there are other threads waiting. +If you are unsure of a value to use for the .Fa pass_limit argument, you should use CK_COHORT_DEFAULT_LOCAL_PASS_LIMIT. .Sh SEE ALSO diff --git a/doc/CK_COHORT_LOCK b/doc/CK_COHORT_LOCK index df39ad4..22475f8 100644 --- a/doc/CK_COHORT_LOCK +++ b/doc/CK_COHORT_LOCK @@ -38,11 +38,11 @@ Concurrency Kit (libck, \-lck) .Sh DESCRIPTION This call attempts to acquire both the local and global (if necessary) locks from .Fa cohort . -The call will block until both locks have been acquired. +The call will block until both locks have been acquired. .Fa global_context -will be passed as the second argument to the function that was provided as the +will be passed as the second argument to the function that was provided as the .Fa global_lock_method -argument to CK_COHORT_PROTOTYPE if that method is called, and +argument to CK_COHORT_PROTOTYPE if that method is called, and .Fa local_context will be passed to the function specified by .Fa local_lock_method diff --git a/doc/CK_COHORT_PROTOTYPE b/doc/CK_COHORT_PROTOTYPE index f058fb8..7a7b1a7 100644 --- a/doc/CK_COHORT_PROTOTYPE +++ b/doc/CK_COHORT_PROTOTYPE @@ -37,7 +37,7 @@ Concurrency Kit (libck, \-lck) "LOCK_FXN global_unlock_method" "LOCK_FXN local_lock_method" "LOCK_FXN local_unlock_method" .Sh DESCRIPTION The ck_cohort.h header file does not define any cohort types. Instead, the user must use -the CK_COHORT_PROTOTYPE or +the CK_COHORT_PROTOTYPE or .Xr CK_COHORT_TRYLOCK_PROTOTYPE 3 macros to define any types they want to use. They must use CK_COHORT_TRYLOCK_PROTOTYPE if they want their cohort type to support trylock operations. diff --git a/doc/CK_COHORT_TRYLOCK b/doc/CK_COHORT_TRYLOCK index fd9306e..22bb4b5 100644 --- a/doc/CK_COHORT_TRYLOCK +++ b/doc/CK_COHORT_TRYLOCK @@ -38,18 +38,18 @@ Concurrency Kit (libck, \-lck) .Sh DESCRIPTION This call attempts to acquire both the local and global (if necessary) locks from .Fa cohort . -It can only be used with cohort types that were defined using the +It can only be used with cohort types that were defined using the .Xr CK_COHORT_TRYLOCK_PROTOTYPE 3 macro. The call will not block and will return a bool that will evaluate to true iff -the cohort was successfully acquired. +the cohort was successfully acquired. .Fa global_trylock_context -will be passed as the second argument to the function that was provided as the +will be passed as the second argument to the function that was provided as the .Fa global_trylock_method -argument to CK_COHORT_TRYLOCK_PROTOTYPE if that method is called, and +argument to CK_COHORT_TRYLOCK_PROTOTYPE if that method is called, and .Fa local_trylock_context will be passed to the function specified by .Fa local_trylock_method . -If the global lock acquisition fails, then the cohort will immediately release its +If the global lock acquisition fails, then the cohort will immediately release its local lock as well, and .Fa local_unlock_context will be passed to the function specified by diff --git a/doc/CK_COHORT_TRYLOCK_PROTOTYPE b/doc/CK_COHORT_TRYLOCK_PROTOTYPE index 7edc032..dd97ad4 100644 --- a/doc/CK_COHORT_TRYLOCK_PROTOTYPE +++ b/doc/CK_COHORT_TRYLOCK_PROTOTYPE @@ -57,7 +57,7 @@ of the other CK_COHORT macros. : This method should return true iff the global lock is acquired by a thread. .br .Fa global_trylock_method -: The method that should be called to try to acquire the global lock. +: The method that should be called to try to acquire the global lock. It should not block and return true iff the lock was successfully acquired. .br .Fa local_lock_method @@ -70,7 +70,7 @@ It should not block and return true iff the lock was successfully acquired. : This method should return true iff the global lock is acquired by a thread. .br .Fa local_trylock_method -: The method that should be called to try to acquire the local lock. +: The method that should be called to try to acquire the local lock. It should not block and return true iff the lock was successfully acquired. .Pp Instances of the defined cohort type can be declared as: diff --git a/doc/CK_COHORT_UNLOCK b/doc/CK_COHORT_UNLOCK index 6c5440a..a9f302f 100644 --- a/doc/CK_COHORT_UNLOCK +++ b/doc/CK_COHORT_UNLOCK @@ -38,11 +38,11 @@ Concurrency Kit (libck, \-lck) .Sh DESCRIPTION This call instructs .Fa cohort -to relinquish its local lock and potentially its global lock as well. +to relinquish its local lock and potentially its global lock as well. .Fa global_context -will be passed as the second argument to the function that was provided as the +will be passed as the second argument to the function that was provided as the .Fa global_lock_method -argument to CK_COHORT_PROTOTYPE if that method is called, and +argument to CK_COHORT_PROTOTYPE if that method is called, and .Fa local_context will be passed to the function specified by .Fa local_lock_method diff --git a/doc/CK_RWCOHORT_INIT b/doc/CK_RWCOHORT_INIT index e097039..18d1b33 100644 --- a/doc/CK_RWCOHORT_INIT +++ b/doc/CK_RWCOHORT_INIT @@ -40,11 +40,11 @@ Concurrency Kit (libck, \-lck) This macro initializes the lock instance pointed to by the .Fa lock argument. Until a lock instance is initialized using the CK_RWCOHORT_INIT macro, any operations -involving it will have undefined behavior. Note that the +involving it will have undefined behavior. Note that the .Fa wait_limit argument should only be used with reader-preference or writer-preference locks. For neutral locks, this argument should be excluded. -If you are unsure of a value to use for the +If you are unsure of a value to use for the .Fa wait_limit argument, you should use CK_RWCOHORT_STRATEGY_DEFAULT_LOCAL_WAIT_LIMIT. .Sh SEE ALSO diff --git a/doc/CK_RWCOHORT_INSTANCE b/doc/CK_RWCOHORT_INSTANCE index fcdfeea..10251a3 100644 --- a/doc/CK_RWCOHORT_INSTANCE +++ b/doc/CK_RWCOHORT_INSTANCE @@ -38,9 +38,9 @@ Concurrency Kit (libck, \-lck) .Fn CK_RWCOHORT_WP_INSTANCE "COHORT_NAME cohort_name" .Sh DESCRIPTION The user must use this macro to declare instances of lock types that they have -defined using the +defined using the .Xr CK_RWCOHORT_PROTOTYPE 3 -macro. The cohort_name must be the same as the one used in the prototype macro. +macro. The cohort_name must be the same as the one used in the prototype macro. For instance, if CK_RWCOHORT_PROTOTYPE was called with the name "foo", the CK_RWCOHORT_INSTANCE macro should be called as .br diff --git a/doc/CK_RWCOHORT_PROTOTYPE b/doc/CK_RWCOHORT_PROTOTYPE index fb4d25a..a2705b6 100644 --- a/doc/CK_RWCOHORT_PROTOTYPE +++ b/doc/CK_RWCOHORT_PROTOTYPE @@ -41,9 +41,9 @@ The ck_rwcohort.h header file does not define any cohort types. Instead, the us the CK_RWCOHORT_PROTOTYPE macro to define any types they want to use. This macro takes a single argument which corresponds to the type of the cohort lock that the reader-writer lock should use. A cohort type must have already been defined with that name -using the +using the .Xr CK_COHORT_PROTOTYPE 3 -or +or .Xr CK_COHORT_TRYLOCK_PROTOTYPE 3 macros. .Pp diff --git a/doc/CK_RWCOHORT_READ_LOCK b/doc/CK_RWCOHORT_READ_LOCK index bf65853..62831ea 100644 --- a/doc/CK_RWCOHORT_READ_LOCK +++ b/doc/CK_RWCOHORT_READ_LOCK @@ -33,24 +33,24 @@ Concurrency Kit (libck, \-lck) .Sh SYNOPSIS .In ck_cohort.h -.Fn CK_RWCOHORT_NEUTRAL_READ_LOCK "COHORT_NAME cohort_name" "LOCK *lock" "COHORT *cohort"\ +.Fn CK_RWCOHORT_NEUTRAL_READ_LOCK "COHORT_NAME cohort_name" "LOCK *lock" "COHORT *cohort"\ "void *global_context" "void *local_context" -.Fn CK_RWCOHORT_RP_READ_LOCK "COHORT_NAME cohort_name" "LOCK *lock" "COHORT *cohort"\ +.Fn CK_RWCOHORT_RP_READ_LOCK "COHORT_NAME cohort_name" "LOCK *lock" "COHORT *cohort"\ "void *global_context" "void *local_context" -.Fn CK_RWCOHORT_WP_READ_LOCK "COHORT_NAME cohort_name" "LOCK *lock" "COHORT *cohort"\ +.Fn CK_RWCOHORT_WP_READ_LOCK "COHORT_NAME cohort_name" "LOCK *lock" "COHORT *cohort"\ "void *global_context" "void *local_context" .Sh DESCRIPTION This call will acquire read-only permission from .Fa lock . -The call will block until this permission has been acquired. -.Fa cohort -must point to a cohort whose global lock is the same as all other cohorts used with +The call will block until this permission has been acquired. +.Fa cohort +must point to a cohort whose global lock is the same as all other cohorts used with .Fa lock . The -.Fa global_context +.Fa global_context and -.Fa local_context -arguments will be passed along as the context arguments to any calls to +.Fa local_context +arguments will be passed along as the context arguments to any calls to .Fa cohort . . .Sh SEE ALSO diff --git a/doc/CK_RWCOHORT_READ_UNLOCK b/doc/CK_RWCOHORT_READ_UNLOCK index 4dd26e1..1c81801 100644 --- a/doc/CK_RWCOHORT_READ_UNLOCK +++ b/doc/CK_RWCOHORT_READ_UNLOCK @@ -33,23 +33,23 @@ Concurrency Kit (libck, \-lck) .Sh SYNOPSIS .In ck_cohort.h -.Fn CK_RWCOHORT_NEUTRAL_READ_UNLOCK "COHORT_NAME cohort_name" "LOCK *lock" "COHORT *cohort"\ +.Fn CK_RWCOHORT_NEUTRAL_READ_UNLOCK "COHORT_NAME cohort_name" "LOCK *lock" "COHORT *cohort"\ "void *global_context" "void *local_context" -.Fn CK_RWCOHORT_RP_READ_UNLOCK "COHORT_NAME cohort_name" "LOCK *lock" "COHORT *cohort"\ +.Fn CK_RWCOHORT_RP_READ_UNLOCK "COHORT_NAME cohort_name" "LOCK *lock" "COHORT *cohort"\ "void *global_context" "void *local_context" -.Fn CK_RWCOHORT_WP_READ_UNLOCK "COHORT_NAME cohort_name" "LOCK *lock" "COHORT *cohort"\ +.Fn CK_RWCOHORT_WP_READ_UNLOCK "COHORT_NAME cohort_name" "LOCK *lock" "COHORT *cohort"\ "void *global_context" "void *local_context" .Sh DESCRIPTION This call will relinquish read-only permission to .Fa lock . -.Fa cohort -must point to a cohort whose global lock is the same as all other cohorts used with +.Fa cohort +must point to a cohort whose global lock is the same as all other cohorts used with .Fa lock . The -.Fa global_context +.Fa global_context and -.Fa local_context -arguments will be passed along as the context arguments to any calls to +.Fa local_context +arguments will be passed along as the context arguments to any calls to .Fa cohort . . .Sh SEE ALSO diff --git a/doc/CK_RWCOHORT_WRITE_LOCK b/doc/CK_RWCOHORT_WRITE_LOCK index 0977cb7..161c7bb 100644 --- a/doc/CK_RWCOHORT_WRITE_LOCK +++ b/doc/CK_RWCOHORT_WRITE_LOCK @@ -33,24 +33,24 @@ Concurrency Kit (libck, \-lck) .Sh SYNOPSIS .In ck_cohort.h -.Fn CK_RWCOHORT_NEUTRAL_WRITE_LOCK "COHORT_NAME cohort_name" "LOCK *lock" "COHORT *cohort"\ +.Fn CK_RWCOHORT_NEUTRAL_WRITE_LOCK "COHORT_NAME cohort_name" "LOCK *lock" "COHORT *cohort"\ "void *global_context" "void *local_context" -.Fn CK_RWCOHORT_RP_WRITE_LOCK "COHORT_NAME cohort_name" "LOCK *lock" "COHORT *cohort"\ +.Fn CK_RWCOHORT_RP_WRITE_LOCK "COHORT_NAME cohort_name" "LOCK *lock" "COHORT *cohort"\ "void *global_context" "void *local_context" -.Fn CK_RWCOHORT_WP_WRITE_LOCK "COHORT_NAME cohort_name" "LOCK *lock" "COHORT *cohort"\ +.Fn CK_RWCOHORT_WP_WRITE_LOCK "COHORT_NAME cohort_name" "LOCK *lock" "COHORT *cohort"\ "void *global_context" "void *local_context" .Sh DESCRIPTION This call will acquire write permission for .Fa lock . -The call will block until this permission has been acquired. -.Fa cohort -must point to a cohort whose global lock is the same as all other cohorts used with +The call will block until this permission has been acquired. +.Fa cohort +must point to a cohort whose global lock is the same as all other cohorts used with .Fa lock . The -.Fa global_context +.Fa global_context and -.Fa local_context -arguments will be passed along as the context arguments to any calls to +.Fa local_context +arguments will be passed along as the context arguments to any calls to .Fa cohort . . .Sh SEE ALSO diff --git a/doc/CK_RWCOHORT_WRITE_UNLOCK b/doc/CK_RWCOHORT_WRITE_UNLOCK index c3537bf..5772a9f 100644 --- a/doc/CK_RWCOHORT_WRITE_UNLOCK +++ b/doc/CK_RWCOHORT_WRITE_UNLOCK @@ -33,23 +33,23 @@ Concurrency Kit (libck, \-lck) .Sh SYNOPSIS .In ck_cohort.h -.Fn CK_RWCOHORT_NEUTRAL_WRITE_UNLOCK "COHORT_NAME cohort_name" "LOCK *lock" "COHORT *cohort"\ +.Fn CK_RWCOHORT_NEUTRAL_WRITE_UNLOCK "COHORT_NAME cohort_name" "LOCK *lock" "COHORT *cohort"\ "void *global_context" "void *local_context" -.Fn CK_RWCOHORT_RP_WRITE_UNLOCK "COHORT_NAME cohort_name" "LOCK *lock" "COHORT *cohort"\ +.Fn CK_RWCOHORT_RP_WRITE_UNLOCK "COHORT_NAME cohort_name" "LOCK *lock" "COHORT *cohort"\ "void *global_context" "void *local_context" -.Fn CK_RWCOHORT_WP_WRITE_UNLOCK "COHORT_NAME cohort_name" "LOCK *lock" "COHORT *cohort"\ +.Fn CK_RWCOHORT_WP_WRITE_UNLOCK "COHORT_NAME cohort_name" "LOCK *lock" "COHORT *cohort"\ "void *global_context" "void *local_context" .Sh DESCRIPTION This call will relinquish write permission for .Fa lock . -.Fa cohort -must point to a cohort whose global lock is the same as all other cohorts used with +.Fa cohort +must point to a cohort whose global lock is the same as all other cohorts used with .Fa lock . The -.Fa global_context +.Fa global_context and -.Fa local_context -arguments will be passed along as the context arguments to any calls to +.Fa local_context +arguments will be passed along as the context arguments to any calls to .Fa cohort . . .Sh SEE ALSO diff --git a/doc/ck_cohort b/doc/ck_cohort index b033c91..4905418 100644 --- a/doc/ck_cohort +++ b/doc/ck_cohort @@ -57,7 +57,7 @@ BOOL_LOCK_FXN refers to a method with the signature bool(void *lock, void *context) .Pp The -.Fa context +.Fa context argument in each signature is used to pass along any additional information that the lock might need for its lock, unlock and trylock methods. The values for this argument are provided to each call to @@ -94,7 +94,7 @@ man pages for more details. #include #include -/* +/* * Create cohort methods with signatures that match * the required signature */ @@ -169,7 +169,7 @@ main(void) calloc(n_cohorts, sizeof(CK_COHORT_INSTANCE(test_cohort))); /* create local locks to use with each cohort */ - ck_spinlock_t *local_locks = + ck_spinlock_t *local_locks = calloc(n_cohorts, sizeof(ck_spinlock_t)); pthread_t *threads = diff --git a/doc/ck_elide b/doc/ck_elide index 3a63e74..c068567 100644 --- a/doc/ck_elide +++ b/doc/ck_elide @@ -100,7 +100,7 @@ returns true, then the .Fa UNLOCK_FUNCTION is executed. If RTM is unsupported (no CK_F_PR_RTM macro) then .Fn CK_ELIDE_LOCK -and +and .Fn CK_ELIDE_LOCK_ADAPTIVE will immediately call .Fn LOCK_FUNCTION . @@ -118,7 +118,7 @@ Elision is attempted if the .Fa LOCK_PREDICATE function returns false. If .Fa LOCK_PREDICATE -returns true or if elision fails then the +returns true or if elision fails then the operation is aborted. If RTM is unsupported (no CK_F_PR_RTM macro) then .Fn CK_ELIDE_TRYLOCK diff --git a/doc/ck_epoch_call b/doc/ck_epoch_call index 4f6286e..288814e 100644 --- a/doc/ck_epoch_call +++ b/doc/ck_epoch_call @@ -46,7 +46,7 @@ function will defer the execution of the function pointed to by until a grace-period has been detected in .Fa epoch . The function will be provided -the pointer specified by +the pointer specified by .Fa entry . The function will execute at some time in the future via calls to .Fn ck_epoch_reclaim 3 , diff --git a/doc/ck_epoch_init b/doc/ck_epoch_init index e22294d..51a3e2a 100644 --- a/doc/ck_epoch_init +++ b/doc/ck_epoch_init @@ -52,7 +52,7 @@ is undefined if .Fa epoch is not a pointer to a .Tn ck_epoch_t -object. +object. .El .Sh SEE ALSO .Xr ck_epoch_register 3 , diff --git a/doc/ck_hs_fas b/doc/ck_hs_fas index 213cef6..69760b5 100644 --- a/doc/ck_hs_fas +++ b/doc/ck_hs_fas @@ -57,7 +57,7 @@ was successful then the key specified by was successfully stored in the hash set pointed to by .Fa hs . The key must already exist in the hash set, and is -replaced by +replaced by .Fa key and the previous value is stored into the void pointer pointed to by the @@ -75,7 +75,7 @@ Behavior is undefined if .Fa key or .Fa hs -are uninitialized. +are uninitialized. .Sh SEE ALSO .Xr ck_hs_init 3 , .Xr ck_hs_move 3 , diff --git a/doc/ck_hs_move b/doc/ck_hs_move index e843ea7..1d30195 100644 --- a/doc/ck_hs_move +++ b/doc/ck_hs_move @@ -38,7 +38,7 @@ Concurrency Kit (libck, \-lck) .Sh DESCRIPTION The .Fn ck_hs_move 3 -function will initialize +function will initialize .Fa source from .Fa destination . diff --git a/doc/ck_hs_next b/doc/ck_hs_next index 1e41301..67e083e 100644 --- a/doc/ck_hs_next +++ b/doc/ck_hs_next @@ -33,7 +33,7 @@ Concurrency Kit (libck, \-lck) .Sh SYNOPSIS .In ck_hs.h -.Ft bool +.Ft bool .Fn ck_hs_next "ck_hs_t *hs" "ck_hs_iterator_t *iterator" "void **entry" .Sh DESCRIPTION The diff --git a/doc/ck_hs_set b/doc/ck_hs_set index 0df792a..e9ba9f1 100644 --- a/doc/ck_hs_set +++ b/doc/ck_hs_set @@ -57,7 +57,7 @@ was successful then the key specified by was successfully stored in the hash set pointed to by .Fa hs . If the key already exists in the hash set, then it is -replaced by +replaced by .Fa key and the previous value is stored into the void pointer pointed to by the diff --git a/doc/ck_pr b/doc/ck_pr index df7ce91..67c726f 100644 --- a/doc/ck_pr +++ b/doc/ck_pr @@ -38,7 +38,7 @@ ck_pr.h provides an interface to volatile atomic instructions, memory barriers and busy-wait facilities as provided by the underlying processor. The presence of an atomic operation is detected by the presence of a corresponding CK_F_PR macro. -For example, the availability of +For example, the availability of .Xr ck_pr_add_16 3 would be determined by the presence of CK_F_PR_ADD_16. .Sh SEE ALSO @@ -56,7 +56,7 @@ would be determined by the presence of CK_F_PR_ADD_16. .Xr ck_pr_faa 3 , .Xr ck_pr_inc 3 , .Xr ck_pr_dec 3 , -.Xr ck_pr_neg 3 , +.Xr ck_pr_neg 3 , .Xr ck_pr_not 3 , .Xr ck_pr_add 3 , .Xr ck_pr_sub 3 , diff --git a/doc/ck_pr_add b/doc/ck_pr_add index 77a3ad2..b4d394a 100644 --- a/doc/ck_pr_add +++ b/doc/ck_pr_add @@ -60,7 +60,7 @@ Concurrency Kit (libck, \-lck) .Ft void .Fn ck_pr_add_8 "uint8_t *target" "uint8_t delta" .Sh DESCRIPTION -The +The .Fn ck_pr_add 3 family of functions atomically add the value specified by .Fa delta @@ -79,7 +79,7 @@ This family of functions does not have a return value. .Xr ck_pr_faa 3 , .Xr ck_pr_inc 3 , .Xr ck_pr_dec 3 , -.Xr ck_pr_neg 3 , +.Xr ck_pr_neg 3 , .Xr ck_pr_not 3 , .Xr ck_pr_sub 3 , .Xr ck_pr_and 3 , diff --git a/doc/ck_pr_and b/doc/ck_pr_and index bd40252..56ce5af 100644 --- a/doc/ck_pr_and +++ b/doc/ck_pr_and @@ -57,9 +57,9 @@ Concurrency Kit (libck, \-lck) .Ft void .Fn ck_pr_and_8 "uint8_t *target" "uint8_t delta" .Sh DESCRIPTION -The +The .Fn ck_pr_and 3 -family of functions atomically compute and store the +family of functions atomically compute and store the result of a bitwise-and of the value pointed to by .Fa target and @@ -79,7 +79,7 @@ This family of functions does not have a return value. .Xr ck_pr_faa 3 , .Xr ck_pr_inc 3 , .Xr ck_pr_dec 3 , -.Xr ck_pr_neg 3 , +.Xr ck_pr_neg 3 , .Xr ck_pr_not 3 , .Xr ck_pr_add 3 , .Xr ck_pr_sub 3 , diff --git a/doc/ck_pr_barrier b/doc/ck_pr_barrier index 128bf38..3886729 100644 --- a/doc/ck_pr_barrier +++ b/doc/ck_pr_barrier @@ -36,7 +36,7 @@ Concurrency Kit (libck, \-lck) .Ft void .Fn ck_pr_barrier void .Sh DESCRIPTION -The +The .Fn ck_pr_barrier 3 function is used to disable code movement optimizations across the invocation of the function. @@ -51,7 +51,7 @@ across the invocation of the function. .Xr ck_pr_faa 3 , .Xr ck_pr_inc 3 , .Xr ck_pr_dec 3 , -.Xr ck_pr_neg 3 , +.Xr ck_pr_neg 3 , .Xr ck_pr_not 3 , .Xr ck_pr_add 3 , .Xr ck_pr_sub 3 , diff --git a/doc/ck_pr_btc b/doc/ck_pr_btc index bbf226f..5956221 100644 --- a/doc/ck_pr_btc +++ b/doc/ck_pr_btc @@ -51,13 +51,13 @@ Concurrency Kit (libck, \-lck) .Ft bool .Fn ck_pr_btc_16 "uint16_t *target" "unsigned int bit_index" .Sh DESCRIPTION -The +The .Fn ck_pr_btc 3 family of functions atomically fetch the value of the bit in .Fa target at index -.Fa bit_index +.Fa bit_index and set that bit to its complement. .Sh RETURN VALUES These family of functions return the original value of @@ -76,7 +76,7 @@ that is in the value pointed to by .Xr ck_pr_faa 3 , .Xr ck_pr_inc 3 , .Xr ck_pr_dec 3 , -.Xr ck_pr_neg 3 , +.Xr ck_pr_neg 3 , .Xr ck_pr_not 3 , .Xr ck_pr_sub 3 , .Xr ck_pr_and 3 , diff --git a/doc/ck_pr_btr b/doc/ck_pr_btr index 1c7760b..d5e03fd 100644 --- a/doc/ck_pr_btr +++ b/doc/ck_pr_btr @@ -51,13 +51,13 @@ Concurrency Kit (libck, \-lck) .Ft bool .Fn ck_pr_btr_16 "uint16_t *target" "unsigned int bit_index" .Sh DESCRIPTION -The +The .Fn ck_pr_btr 3 family of functions atomically fetch the value of the bit in .Fa target at index -.Fa bit_index +.Fa bit_index and set that bit to 0. .Sh RETURN VALUES This family of functions returns the original value of @@ -76,7 +76,7 @@ that is in the value pointed to by .Xr ck_pr_faa 3 , .Xr ck_pr_inc 3 , .Xr ck_pr_dec 3 , -.Xr ck_pr_neg 3 , +.Xr ck_pr_neg 3 , .Xr ck_pr_not 3 , .Xr ck_pr_sub 3 , .Xr ck_pr_and 3 , diff --git a/doc/ck_pr_bts b/doc/ck_pr_bts index 4ee6163..955855d 100644 --- a/doc/ck_pr_bts +++ b/doc/ck_pr_bts @@ -51,13 +51,13 @@ Concurrency Kit (libck, \-lck) .Ft bool .Fn ck_pr_bts_16 "uint16_t *target" "unsigned int bit_index" .Sh DESCRIPTION -The +The .Fn ck_pr_bts 3 family of functions atomically fetch the value of the bit in .Fa target at index -.Fa bit_index +.Fa bit_index and set that bit to 1. .Sh RETURN VALUES This family of functions returns the original value of @@ -76,7 +76,7 @@ that is in the value pointed to by .Xr ck_pr_faa 3 , .Xr ck_pr_inc 3 , .Xr ck_pr_dec 3 , -.Xr ck_pr_neg 3 , +.Xr ck_pr_neg 3 , .Xr ck_pr_not 3 , .Xr ck_pr_sub 3 , .Xr ck_pr_and 3 , diff --git a/doc/ck_pr_cas b/doc/ck_pr_cas index e0b4674..1fa3a88 100644 --- a/doc/ck_pr_cas +++ b/doc/ck_pr_cas @@ -99,9 +99,9 @@ Concurrency Kit (libck, \-lck) .Ft bool .Fn ck_pr_cas_8_value "uint8_t *target" "uint8_t old_value" "uint8_t new_value" "uint8_t *original_value" .Sh DESCRIPTION -The +The .Fn ck_pr_cas 3 -family of functions atomically compare the value in +family of functions atomically compare the value in .Fa target for equality with .Fa old_value @@ -133,7 +133,7 @@ return false. .Xr ck_pr_faa 3 , .Xr ck_pr_inc 3 , .Xr ck_pr_dec 3 , -.Xr ck_pr_neg 3 , +.Xr ck_pr_neg 3 , .Xr ck_pr_not 3 , .Xr ck_pr_sub 3 , .Xr ck_pr_and 3 , diff --git a/doc/ck_pr_dec b/doc/ck_pr_dec index c3bc7b4..f3d34dd 100644 --- a/doc/ck_pr_dec +++ b/doc/ck_pr_dec @@ -87,7 +87,7 @@ Concurrency Kit (libck, \-lck) .Ft void .Fn ck_pr_dec_8_zero "uint8_t *target" "bool *z" .Sh DESCRIPTION -The +The .Fn ck_pr_dec 3 family of functions atomically decrement the value pointed to by @@ -109,7 +109,7 @@ to false otherwise. .Xr ck_pr_fas 3 , .Xr ck_pr_faa 3 , .Xr ck_pr_inc 3 , -.Xr ck_pr_neg 3 , +.Xr ck_pr_neg 3 , .Xr ck_pr_not 3 , .Xr ck_pr_add 3 , .Xr ck_pr_sub 3 , diff --git a/doc/ck_pr_faa b/doc/ck_pr_faa index 06e0761..fbeff01 100644 --- a/doc/ck_pr_faa +++ b/doc/ck_pr_faa @@ -60,7 +60,7 @@ Concurrency Kit (libck, \-lck) .Ft uint8_t .Fn ck_pr_faa_8 "uint8_t *target" "uint8_t delta" .Sh DESCRIPTION -The +The .Fn ck_pr_faa 3 family of functions atomically fetch the value pointed to by @@ -84,7 +84,7 @@ addition operation is applied. .Xr ck_pr_fas 3 , .Xr ck_pr_inc 3 , .Xr ck_pr_dec 3 , -.Xr ck_pr_neg 3 , +.Xr ck_pr_neg 3 , .Xr ck_pr_not 3 , .Xr ck_pr_add 3 , .Xr ck_pr_sub 3 , diff --git a/doc/ck_pr_fas b/doc/ck_pr_fas index 5059151..037b104 100644 --- a/doc/ck_pr_fas +++ b/doc/ck_pr_fas @@ -60,7 +60,7 @@ Concurrency Kit (libck, \-lck) .Ft uint8_t .Fn ck_pr_fas_8 "uint8_t *target" "uint8_t new_value" .Sh DESCRIPTION -The +The .Fn ck_pr_fas 3 family of functions atomically fetch the value pointed to by @@ -85,7 +85,7 @@ atomically replaced with .Xr ck_pr_faa 3 , .Xr ck_pr_inc 3 , .Xr ck_pr_dec 3 , -.Xr ck_pr_neg 3 , +.Xr ck_pr_neg 3 , .Xr ck_pr_not 3 , .Xr ck_pr_add 3 , .Xr ck_pr_sub 3 , diff --git a/doc/ck_pr_fence_acquire b/doc/ck_pr_fence_acquire index 9da53c0..2d6b997 100644 --- a/doc/ck_pr_fence_acquire +++ b/doc/ck_pr_fence_acquire @@ -57,7 +57,7 @@ This function has no return value. .Xr ck_pr_faa 3 , .Xr ck_pr_inc 3 , .Xr ck_pr_dec 3 , -.Xr ck_pr_neg 3 , +.Xr ck_pr_neg 3 , .Xr ck_pr_not 3 , .Xr ck_pr_add 3 , .Xr ck_pr_sub 3 , diff --git a/doc/ck_pr_fence_atomic b/doc/ck_pr_fence_atomic index 452606b..65ed270 100644 --- a/doc/ck_pr_fence_atomic +++ b/doc/ck_pr_fence_atomic @@ -25,7 +25,7 @@ .\" .\" .Dd May 16, 2013 -.Dt CK_PR_FENCE_ATOMIC 3 +.Dt CK_PR_FENCE_ATOMIC 3 .Sh NAME .Nm ck_pr_fence_atomic .Nd enforce partial ordering of atomic read-modify-write operations @@ -38,9 +38,9 @@ Concurrency Kit (libck, \-lck) .Ft void .Fn ck_pr_fence_strict_atomic void .Sh DESCRIPTION -The +The .Fn ck_pr_fence_atomic -function enfores the ordering of any +function enfores the ordering of any atomic read-modify-write operations relative to the invocation of the function. This function always serve as an implicit compiler barrier. On @@ -96,7 +96,7 @@ This function has no return value. .Xr ck_pr_faa 3 , .Xr ck_pr_inc 3 , .Xr ck_pr_dec 3 , -.Xr ck_pr_neg 3 , +.Xr ck_pr_neg 3 , .Xr ck_pr_not 3 , .Xr ck_pr_add 3 , .Xr ck_pr_sub 3 , diff --git a/doc/ck_pr_fence_atomic_load b/doc/ck_pr_fence_atomic_load index cbefdaa..22925ea 100644 --- a/doc/ck_pr_fence_atomic_load +++ b/doc/ck_pr_fence_atomic_load @@ -25,7 +25,7 @@ .\" .\" .Dd May 16, 2013 -.Dt CK_PR_FENCE_ATOMIC_LOAD 3 +.Dt CK_PR_FENCE_ATOMIC_LOAD 3 .Sh NAME .Nm ck_pr_fence_atomic_load .Nd enforce ordering of atomic read-modify-write operations to load operations @@ -38,9 +38,9 @@ Concurrency Kit (libck, \-lck) .Ft void .Fn ck_pr_fence_strict_atomic_load void .Sh DESCRIPTION -The +The .Fn ck_pr_fence_atomic_load -function enfores the ordering of any +function enfores the ordering of any atomic read-modify-write operations relative to any load operations following the function invocation. This function always serve as an implicit compiler barrier. On @@ -93,7 +93,7 @@ This function has no return value. .Xr ck_pr_faa 3 , .Xr ck_pr_inc 3 , .Xr ck_pr_dec 3 , -.Xr ck_pr_neg 3 , +.Xr ck_pr_neg 3 , .Xr ck_pr_not 3 , .Xr ck_pr_add 3 , .Xr ck_pr_sub 3 , diff --git a/doc/ck_pr_fence_atomic_store b/doc/ck_pr_fence_atomic_store index a14867c..ad1735b 100644 --- a/doc/ck_pr_fence_atomic_store +++ b/doc/ck_pr_fence_atomic_store @@ -25,7 +25,7 @@ .\" .\" .Dd May 16, 2013 -.Dt CK_PR_FENCE_ATOMIC_STORE 3 +.Dt CK_PR_FENCE_ATOMIC_STORE 3 .Sh NAME .Nm ck_pr_fence_atomic_store .Nd enforce ordering of atomic read-modify-write operations to store operations @@ -38,9 +38,9 @@ Concurrency Kit (libck, \-lck) .Ft void .Fn ck_pr_fence_strict_atomic_store void .Sh DESCRIPTION -The +The .Fn ck_pr_fence_atomic_store -function enfores the ordering of any +function enfores the ordering of any atomic read-modify-write operations relative to any load operations following the function invocation. This function always serve as an implicit compiler barrier. On @@ -94,7 +94,7 @@ This function has no return value. .Xr ck_pr_faa 3 , .Xr ck_pr_inc 3 , .Xr ck_pr_dec 3 , -.Xr ck_pr_neg 3 , +.Xr ck_pr_neg 3 , .Xr ck_pr_not 3 , .Xr ck_pr_add 3 , .Xr ck_pr_sub 3 , diff --git a/doc/ck_pr_fence_load b/doc/ck_pr_fence_load index da8e6d4..b6e778d 100644 --- a/doc/ck_pr_fence_load +++ b/doc/ck_pr_fence_load @@ -98,7 +98,7 @@ This function has no return value. .Xr ck_pr_faa 3 , .Xr ck_pr_inc 3 , .Xr ck_pr_dec 3 , -.Xr ck_pr_neg 3 , +.Xr ck_pr_neg 3 , .Xr ck_pr_not 3 , .Xr ck_pr_add 3 , .Xr ck_pr_sub 3 , diff --git a/doc/ck_pr_fence_load_atomic b/doc/ck_pr_fence_load_atomic index 774a263..c935491 100644 --- a/doc/ck_pr_fence_load_atomic +++ b/doc/ck_pr_fence_load_atomic @@ -98,7 +98,7 @@ This function has no return value. .Xr ck_pr_faa 3 , .Xr ck_pr_inc 3 , .Xr ck_pr_dec 3 , -.Xr ck_pr_neg 3 , +.Xr ck_pr_neg 3 , .Xr ck_pr_not 3 , .Xr ck_pr_add 3 , .Xr ck_pr_sub 3 , diff --git a/doc/ck_pr_fence_load_depends b/doc/ck_pr_fence_load_depends index 38718ec..0c0ecfa 100644 --- a/doc/ck_pr_fence_load_depends +++ b/doc/ck_pr_fence_load_depends @@ -36,7 +36,7 @@ Concurrency Kit (libck, \-lck) .Ft void .Fn ck_pr_fence_load_depends void .Sh DESCRIPTION -The +The .Fn ck_pr_fence_load_depends 3 emits necessary fences for pure data-dependent loads. It currently only serves as a compiler barrier for Concurrency Kit's supported platforms. Unless you're on architecture @@ -60,7 +60,7 @@ This function has no return value. .Xr ck_pr_faa 3 , .Xr ck_pr_inc 3 , .Xr ck_pr_dec 3 , -.Xr ck_pr_neg 3 , +.Xr ck_pr_neg 3 , .Xr ck_pr_not 3 , .Xr ck_pr_add 3 , .Xr ck_pr_sub 3 , diff --git a/doc/ck_pr_fence_load_store b/doc/ck_pr_fence_load_store index 378903e..4abce99 100644 --- a/doc/ck_pr_fence_load_store +++ b/doc/ck_pr_fence_load_store @@ -98,7 +98,7 @@ This function has no return value. .Xr ck_pr_faa 3 , .Xr ck_pr_inc 3 , .Xr ck_pr_dec 3 , -.Xr ck_pr_neg 3 , +.Xr ck_pr_neg 3 , .Xr ck_pr_not 3 , .Xr ck_pr_add 3 , .Xr ck_pr_sub 3 , diff --git a/doc/ck_pr_fence_memory b/doc/ck_pr_fence_memory index f223527..0dfc81b 100644 --- a/doc/ck_pr_fence_memory +++ b/doc/ck_pr_fence_memory @@ -38,7 +38,7 @@ Concurrency Kit (libck, \-lck) .Ft void .Fn ck_pr_fence_strict_memory .Sh DESCRIPTION -The +The .Fn ck_pr_fence_memory 3 function enforces the ordering of any memory operations with respect to the invocation of the function. This function @@ -98,7 +98,7 @@ This function has no return value. .Xr ck_pr_faa 3 , .Xr ck_pr_inc 3 , .Xr ck_pr_dec 3 , -.Xr ck_pr_neg 3 , +.Xr ck_pr_neg 3 , .Xr ck_pr_not 3 , .Xr ck_pr_add 3 , .Xr ck_pr_sub 3 , diff --git a/doc/ck_pr_fence_release b/doc/ck_pr_fence_release index 6794bbf..214917c 100644 --- a/doc/ck_pr_fence_release +++ b/doc/ck_pr_fence_release @@ -56,7 +56,7 @@ This function has no return value. .Xr ck_pr_faa 3 , .Xr ck_pr_inc 3 , .Xr ck_pr_dec 3 , -.Xr ck_pr_neg 3 , +.Xr ck_pr_neg 3 , .Xr ck_pr_not 3 , .Xr ck_pr_add 3 , .Xr ck_pr_sub 3 , diff --git a/doc/ck_pr_fence_store b/doc/ck_pr_fence_store index 5bb8f00..c5c5223 100644 --- a/doc/ck_pr_fence_store +++ b/doc/ck_pr_fence_store @@ -38,7 +38,7 @@ Concurrency Kit (libck, \-lck) .Ft void .Fn ck_pr_fence_strict_store void .Sh DESCRIPTION -The +The .Fn ck_pr_fence_store function enfores the ordering of any memory store, .Fn ck_pr_store @@ -97,7 +97,7 @@ This function has no return value. .Xr ck_pr_faa 3 , .Xr ck_pr_inc 3 , .Xr ck_pr_dec 3 , -.Xr ck_pr_neg 3 , +.Xr ck_pr_neg 3 , .Xr ck_pr_not 3 , .Xr ck_pr_add 3 , .Xr ck_pr_sub 3 , diff --git a/doc/ck_pr_fence_store_atomic b/doc/ck_pr_fence_store_atomic index a559f22..d53d2ae 100644 --- a/doc/ck_pr_fence_store_atomic +++ b/doc/ck_pr_fence_store_atomic @@ -38,13 +38,13 @@ Concurrency Kit (libck, \-lck) .Ft void .Fn ck_pr_fence_strict_store_atomic void .Sh DESCRIPTION -The +The .Fn ck_pr_fence_store_atomic function enfores the ordering of any memory store, .Fn ck_pr_store and atomic read-modify-write operations to atomic read-modify-write operations relative to the invocation of the function. This function -always serve as an implicit compiler barrier. +always serve as an implicit compiler barrier. This functions will emit a fence for PSO and RMO targets. In order to force the emission of a fence use the .Fn ck_pr_fence_strict_store_atomic @@ -93,7 +93,7 @@ This function has no return value. .Xr ck_pr_faa 3 , .Xr ck_pr_inc 3 , .Xr ck_pr_dec 3 , -.Xr ck_pr_neg 3 , +.Xr ck_pr_neg 3 , .Xr ck_pr_not 3 , .Xr ck_pr_add 3 , .Xr ck_pr_sub 3 , diff --git a/doc/ck_pr_fence_store_load b/doc/ck_pr_fence_store_load index 40d1875..485bbcf 100644 --- a/doc/ck_pr_fence_store_load +++ b/doc/ck_pr_fence_store_load @@ -38,13 +38,13 @@ Concurrency Kit (libck, \-lck) .Ft void .Fn ck_pr_fence_strict_store_load void .Sh DESCRIPTION -The +The .Fn ck_pr_fence_store_load function enfores the ordering of any memory store, .Fn ck_pr_store and atomic read-modify-write operations to load operations relative to the invocation of the function. This function -always serve as an implicit compiler barrier. +always serve as an implicit compiler barrier. A fence will currently always be emitted for this operation, including for TSO memory model targets. .Sh EXAMPLE @@ -92,7 +92,7 @@ This function has no return value. .Xr ck_pr_faa 3 , .Xr ck_pr_inc 3 , .Xr ck_pr_dec 3 , -.Xr ck_pr_neg 3 , +.Xr ck_pr_neg 3 , .Xr ck_pr_not 3 , .Xr ck_pr_add 3 , .Xr ck_pr_sub 3 , diff --git a/doc/ck_pr_inc b/doc/ck_pr_inc index 0b8f449..72a3e70 100644 --- a/doc/ck_pr_inc +++ b/doc/ck_pr_inc @@ -87,7 +87,7 @@ Concurrency Kit (libck, \-lck) .Ft void .Fn ck_pr_inc_8_zero "uint8_t *target" "bool *z" .Sh DESCRIPTION -The +The .Fn ck_pr_inc 3 family of functions atomically increment the value pointed to by @@ -109,7 +109,7 @@ false otherwise. .Xr ck_pr_fas 3 , .Xr ck_pr_faa 3 , .Xr ck_pr_dec 3 , -.Xr ck_pr_neg 3 , +.Xr ck_pr_neg 3 , .Xr ck_pr_not 3 , .Xr ck_pr_add 3 , .Xr ck_pr_sub 3 , diff --git a/doc/ck_pr_load b/doc/ck_pr_load index f0ab96d..ed615d3 100644 --- a/doc/ck_pr_load +++ b/doc/ck_pr_load @@ -60,7 +60,7 @@ Concurrency Kit (libck, \-lck) .Ft uint8_t .Fn ck_pr_load_8 "const uint8_t *target" .Sh DESCRIPTION -The +The .Fn ck_pr_load 3 family of functions atomically loads the value pointed to by @@ -82,7 +82,7 @@ in the location pointed to by the first argument. .Xr ck_pr_faa 3 , .Xr ck_pr_inc 3 , .Xr ck_pr_dec 3 , -.Xr ck_pr_neg 3 , +.Xr ck_pr_neg 3 , .Xr ck_pr_not 3 , .Xr ck_pr_sub 3 , .Xr ck_pr_and 3 , diff --git a/doc/ck_pr_neg b/doc/ck_pr_neg index 6654856..38f9a0a 100644 --- a/doc/ck_pr_neg +++ b/doc/ck_pr_neg @@ -87,7 +87,7 @@ Concurrency Kit (libck, \-lck) .Ft void .Fn ck_pr_neg_8_zero "uint8_t *target" "bool *z" .Sh DESCRIPTION -The +The .Fn ck_pr_neg 3 family of functions atomically negate the value pointed to by @@ -107,7 +107,7 @@ pointed to value to false otherwise. .Xr ck_pr_fas 3 , .Xr ck_pr_faa 3 , .Xr ck_pr_inc 3 , -.Xr ck_pr_dec 3 , +.Xr ck_pr_dec 3 , .Xr ck_pr_not 3 , .Xr ck_pr_add 3 , .Xr ck_pr_sub 3 , diff --git a/doc/ck_pr_not b/doc/ck_pr_not index d6eb51c..b0a38b2 100644 --- a/doc/ck_pr_not +++ b/doc/ck_pr_not @@ -60,7 +60,7 @@ Concurrency Kit (libck, \-lck) .Ft void .Fn ck_pr_not_8 "uint8_t *target" .Sh DESCRIPTION -The +The .Fn ck_pr_not 3 family of functions atomically complement the value pointed to by @@ -78,7 +78,7 @@ These functions have no return value. .Xr ck_pr_faa 3 , .Xr ck_pr_inc 3 , .Xr ck_pr_not 3 , -.Xr ck_pr_neg 3 , +.Xr ck_pr_neg 3 , .Xr ck_pr_add 3 , .Xr ck_pr_sub 3 , .Xr ck_pr_and 3 , diff --git a/doc/ck_pr_or b/doc/ck_pr_or index 9ceddc5..2a68330 100644 --- a/doc/ck_pr_or +++ b/doc/ck_pr_or @@ -57,9 +57,9 @@ Concurrency Kit (libck, \-lck) .Ft void .Fn ck_pr_or_8 "uint8_t *target" "uint8_t delta" .Sh DESCRIPTION -The +The .Fn ck_pr_or 3 -family of functions atomically compute and store the +family of functions atomically compute and store the result of a bitwise-or of the value pointed to by .Fa target and @@ -79,7 +79,7 @@ This family of functions does not have a return value. .Xr ck_pr_faa 3 , .Xr ck_pr_inc 3 , .Xr ck_pr_dec 3 , -.Xr ck_pr_neg 3 , +.Xr ck_pr_neg 3 , .Xr ck_pr_not 3 , .Xr ck_pr_add 3 , .Xr ck_pr_sub 3 , diff --git a/doc/ck_pr_rtm b/doc/ck_pr_rtm index a15aa91..53c31b6 100644 --- a/doc/ck_pr_rtm +++ b/doc/ck_pr_rtm @@ -98,7 +98,7 @@ set manuals. .Xr ck_pr_faa 3 , .Xr ck_pr_inc 3 , .Xr ck_pr_dec 3 , -.Xr ck_pr_neg 3 , +.Xr ck_pr_neg 3 , .Xr ck_pr_not 3 , .Xr ck_pr_sub 3 , .Xr ck_pr_and 3 , diff --git a/doc/ck_pr_stall b/doc/ck_pr_stall index 762a739..bc46647 100644 --- a/doc/ck_pr_stall +++ b/doc/ck_pr_stall @@ -36,9 +36,9 @@ Concurrency Kit (libck, \-lck) .Ft void .Fn ck_pr_stall void .Sh DESCRIPTION -The +The .Fn ck_pr_stall 3 -function should be used inside retry paths of busy-wait loops. +function should be used inside retry paths of busy-wait loops. It not only serves as a compiler barrier, but on some architectures it emits cycle-saving instructions. .Sh EXAMPLE @@ -71,7 +71,7 @@ function(void) .Xr ck_pr_faa 3 , .Xr ck_pr_inc 3 , .Xr ck_pr_dec 3 , -.Xr ck_pr_neg 3 , +.Xr ck_pr_neg 3 , .Xr ck_pr_not 3 , .Xr ck_pr_add 3 , .Xr ck_pr_sub 3 , diff --git a/doc/ck_pr_store b/doc/ck_pr_store index 5cc7053..462cf7b 100644 --- a/doc/ck_pr_store +++ b/doc/ck_pr_store @@ -60,7 +60,7 @@ Concurrency Kit (libck, \-lck) .Ft void .Fn ck_pr_store_8 "uint8_t *target" "uint8_t value" .Sh DESCRIPTION -The +The .Fn ck_pr_store 3 family of functions atomically stores the value specified by @@ -82,7 +82,7 @@ This family of functions has no return value. .Xr ck_pr_faa 3 , .Xr ck_pr_inc 3 , .Xr ck_pr_dec 3 , -.Xr ck_pr_neg 3 , +.Xr ck_pr_neg 3 , .Xr ck_pr_not 3 , .Xr ck_pr_sub 3 , .Xr ck_pr_and 3 , diff --git a/doc/ck_pr_sub b/doc/ck_pr_sub index 697ea1b..5eee170 100644 --- a/doc/ck_pr_sub +++ b/doc/ck_pr_sub @@ -60,7 +60,7 @@ Concurrency Kit (libck, \-lck) .Ft void .Fn ck_pr_sub_8 "uint8_t *target" "uint8_t delta" .Sh DESCRIPTION -The +The .Fn ck_pr_sub 3 family of functions atomically subtract the value specified by .Fa delta @@ -79,7 +79,7 @@ This family of functions does not have a return value. .Xr ck_pr_faa 3 , .Xr ck_pr_inc 3 , .Xr ck_pr_dec 3 , -.Xr ck_pr_neg 3 , +.Xr ck_pr_neg 3 , .Xr ck_pr_not 3 , .Xr ck_pr_add 3 , .Xr ck_pr_and 3 , diff --git a/doc/ck_pr_xor b/doc/ck_pr_xor index cda38cb..509f60d 100644 --- a/doc/ck_pr_xor +++ b/doc/ck_pr_xor @@ -57,9 +57,9 @@ Concurrency Kit (libck, \-lck) .Ft void .Fn ck_pr_xor_8 "uint8_t *target" "uint8_t delta" .Sh DESCRIPTION -The +The .Fn ck_pr_xor 3 -family of functions atomically compute and store the +family of functions atomically compute and store the result of a bitwise-xor of the value pointed to by .Fa target and @@ -79,7 +79,7 @@ This family of functions does not have a return value. .Xr ck_pr_faa 3 , .Xr ck_pr_inc 3 , .Xr ck_pr_dec 3 , -.Xr ck_pr_neg 3 , +.Xr ck_pr_neg 3 , .Xr ck_pr_not 3 , .Xr ck_pr_add 3 , .Xr ck_pr_sub 3 , diff --git a/doc/ck_ring_dequeue_spmc b/doc/ck_ring_dequeue_spmc index 82fc2fb..7fd7d9b 100644 --- a/doc/ck_ring_dequeue_spmc +++ b/doc/ck_ring_dequeue_spmc @@ -91,7 +91,7 @@ dequeue(void) } /* An empty ring was encountered, leave. */ - return; + return; } .Ed .Sh RETURN VALUES diff --git a/doc/ck_ring_dequeue_spsc b/doc/ck_ring_dequeue_spsc index 75b36ac..069dc7f 100644 --- a/doc/ck_ring_dequeue_spsc +++ b/doc/ck_ring_dequeue_spsc @@ -89,7 +89,7 @@ dequeue(void) } /* An empty ring was encountered, leave. */ - return; + return; } .Ed .Sh RETURN VALUES diff --git a/doc/ck_ring_enqueue_spmc b/doc/ck_ring_enqueue_spmc index 20fd6a8..ba99199 100644 --- a/doc/ck_ring_enqueue_spmc +++ b/doc/ck_ring_enqueue_spmc @@ -42,7 +42,7 @@ function enqueues the pointer .Fa entry into the bounded buffer pointed to by .Fa ring -in FIFO fashion. +in FIFO fashion. The buffer pointed to by .Fa buffer must be unique to @@ -88,11 +88,11 @@ enqueue(void) } /* Enqueue operation completed successfully. */ - return; + return; } .Ed .Sh RETURN VALUES -The function returns true if the value of +The function returns true if the value of .Fa entry was successfully enqueued into .Fa ring . diff --git a/doc/ck_ring_enqueue_spmc_size b/doc/ck_ring_enqueue_spmc_size index 900bd28..eb30cab 100644 --- a/doc/ck_ring_enqueue_spmc_size +++ b/doc/ck_ring_enqueue_spmc_size @@ -42,7 +42,7 @@ function enqueues the pointer .Fa entry into the bounded buffer pointed to by .Fa ring -in FIFO fashion. +in FIFO fashion. The buffer pointed to by .Fa buffer must be unique to @@ -96,11 +96,11 @@ enqueue(void) do_something; } - return; + return; } .Ed .Sh RETURN VALUES -The function returns true if the value of +The function returns true if the value of .Fa entry was successfully enqueued into .Fa ring . diff --git a/doc/ck_ring_enqueue_spsc b/doc/ck_ring_enqueue_spsc index e5fbbec..2493059 100644 --- a/doc/ck_ring_enqueue_spsc +++ b/doc/ck_ring_enqueue_spsc @@ -42,7 +42,7 @@ function enqueues the pointer .Fa entry into the bounded buffer pointed to by .Fa ring -in FIFO fashion. +in FIFO fashion. The buffer pointed to by .Fa buffer must be unique to @@ -86,11 +86,11 @@ enqueue(void) } /* Enqueue operation completed successfully. */ - return; + return; } .Ed .Sh RETURN VALUES -The function returns true if the value of +The function returns true if the value of .Fa entry was successfully enqueued into .Fa ring . diff --git a/doc/ck_ring_enqueue_spsc_size b/doc/ck_ring_enqueue_spsc_size index 90bdf12..7048ea1 100644 --- a/doc/ck_ring_enqueue_spsc_size +++ b/doc/ck_ring_enqueue_spsc_size @@ -42,7 +42,7 @@ function enqueues the pointer .Fa entry into the bounded buffer pointed to by .Fa ring -in FIFO fashion. +in FIFO fashion. The buffer pointed to by .Fa buffer must be unique to @@ -94,11 +94,11 @@ enqueue(void) do_something; } - return; + return; } .Ed .Sh RETURN VALUES -The function returns true if the value of +The function returns true if the value of .Fa entry was successfully enqueued into .Fa ring . diff --git a/doc/ck_ring_trydequeue_spmc b/doc/ck_ring_trydequeue_spmc index 52a92b6..16f83ee 100644 --- a/doc/ck_ring_trydequeue_spmc +++ b/doc/ck_ring_trydequeue_spmc @@ -71,7 +71,7 @@ in a bounded number of steps. It is possible for the function to return false even if .Fa ring -is non-empty. This +is non-empty. This .Sh EXAMPLE .Bd -literal -offset indent #include @@ -97,7 +97,7 @@ dequeue(void) } /* An empty ring was encountered, leave. */ - return; + return; } .Ed .Sh RETURN VALUES diff --git a/doc/ck_rwcohort b/doc/ck_rwcohort index 673261d..ba2b5f9 100644 --- a/doc/ck_rwcohort +++ b/doc/ck_rwcohort @@ -69,7 +69,7 @@ either the .Xr CK_COHORT_PROTOTYPE 3 or the .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 macro. .Pp @@ -161,7 +161,7 @@ main(void) calloc(n_cohorts, sizeof(CK_COHORT_INSTANCE(test_cohort))); /* create local locks to use with each cohort */ - ck_spinlock_t *local_locks = + ck_spinlock_t *local_locks = calloc(n_cohorts, sizeof(ck_spinlock_t)); pthread_t *threads = diff --git a/doc/ck_spinlock b/doc/ck_spinlock index 67d4555..564d185 100644 --- a/doc/ck_spinlock +++ b/doc/ck_spinlock @@ -200,7 +200,7 @@ provides a summary of the current implementations. ck_spinlock_ticket Ticket Centralized None Yes .Ed .Pp -* Hierarchical CLH only offers weak fairness for threads accross cluster +* Hierarchical CLH only offers weak fairness for threads accross cluster nodes. .Pp If contention is low and there is no hard requirement for starvation-freedom