lib/libdmsg/msg_lnk.c
h2span_cluster_t *
dmsg_cluster_get(uuid_t *pfs_clid)
{
	h2span_cluster_t dummy_cls;
	h2span_cluster_t *cls;

	dummy_cls.pfs_clid = *pfs_clid;
	pthread_mutex_lock(&cluster_mtx);
	cls = RB_FIND(h2span_cluster_tree, &cluster_tree, &dummy_cls);
	if (cls)
		++cls->refs;
	pthread_mutex_unlock(&cluster_mtx);
	return (cls);
}
/*
 * Obtain a stable handle on a cluster given its uuid.  This ties directly
 * into the global cluster topology, creating the structure if necessary
 * (even if the uuid does not exist or does not exist yet), and preventing
 * the structure from getting ripped out from under us while we hold a
 * pointer to it.
 */
Obtain a stable handle on a cluster given its uuid.  This ties directly
into the global cluster topology, creating the structure if necessary
(even if the uuid does not exist or does not exist yet), and preventing
the structure from getting ripped out from under us while we hold a
pointer to it.
Obtain a stable handle on a cluster given its uuid . This ties directly into the global cluster topology creating the structure if necessary ( even if the uuid does not exist or does not exist yet ) and preventing the structure from getting ripped out from under us while we hold a pointer to it .
h2span_cluster_t *
dmsg_cluster_get(uuid_t *pfs_clid)
{
	h2span_cluster_t dummy_cls;
	h2span_cluster_t *cls;
	dummy_cls.pfs_clid = *pfs_clid;
	pthread_mutex_lock(&cluster_mtx);
	cls = RB_FIND(h2span_cluster_tree, &cluster_tree, &dummy_cls);
	if (cls)
		++cls->refs;
	pthread_mutex_unlock(&cluster_mtx);
	return (cls);
}
h2span_cluster_t * dmsg_cluster_get ( uuid_t * pfs_clid ) { h2span_cluster_t dummy_cls ; h2span_cluster_t * cls ; dummy_cls . pfs_clid = * pfs_clid ; pthread_mutex_lock ( & cluster_mtx ) ; cls = RB_FIND ( h2span_cluster_tree , & cluster_tree , & dummy_cls ) ; if ( cls ) ++ cls -> refs ; pthread_mutex_unlock ( & cluster_mtx ) ; return ( cls ) ; }
Obtain a stable handle on a cluster given its uuid.
Obtain a stable handle on a cluster given its uuid .