GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
CK_RWCOHORT_INSTANCE(3) FreeBSD Library Functions Manual CK_RWCOHORT_INSTANCE(3)

CK_RWCOHORT_INSTANCE
declare an instance of a cohort-based reader-writer lock type

Concurrency Kit (libck, -lck)

#include <ck_cohort.h>

CK_RWCOHORT_NEUTRAL_INSTANCE(COHORT_NAME cohort_name);

CK_RWCOHORT_RP_INSTANCE(COHORT_NAME cohort_name);

CK_RWCOHORT_WP_INSTANCE(COHORT_NAME cohort_name);

The user must use this macro to declare instances of lock types that they have defined using the CK_RWCOHORT_PROTOTYPE(3) macro. The cohort_name must be the same as the one used in the prototype macro. For instance, if CK_RWCOHORT_PROTOTYPE was called with the name "foo", the CK_RWCOHORT_INSTANCE macro should be called as
CK_RWCOHORT_INSTANCE(foo) cohort;

This macro should also be used when allocating memory for cohorts. For instance, to allocate a block of 4 cohorts:
CK_RWCOHORT_WP_INSTANCE(foo) *cohorts = malloc(4 * sizeof(CK_RWCOHORT_WP_INSTANCE(foo)));

ck_rwcohort(3), CK_RWCOHORT_PROTOTYPE(3), CK_RWCOHORT_TRYLOCK_PROTOTYPE(3), CK_RWCOHORT_INSTANCE(3), CK_RWCOHORT_INITIALIZER(3), CK_RWCOHORT_LOCK(3), CK_RWCOHORT_UNLOCK(3), CK_RWCOHORT_LOCKED(3), CK_RWCOHORT_TRYLOCK(3),

Additional information available at http://concurrencykit.org/

February 24, 2013.

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.