From: Mathieu Desnoyers Date: Tue, 11 Jun 2013 12:53:02 +0000 (-0400) Subject: rcuja-range: get values X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=03a50ae89ec4d7f39e91d0d49c4639c4cf6e894c;p=userspace-rcu.git rcuja-range: get values Signed-off-by: Mathieu Desnoyers --- diff --git a/rcuja/rcuja-range.c b/rcuja/rcuja-range.c index 72a7609..7e4585e 100644 --- a/rcuja/rcuja-range.c +++ b/rcuja/rcuja-range.c @@ -217,6 +217,14 @@ void cds_ja_range_unlock(struct cds_ja_range *range) pthread_mutex_unlock(&range->lock); } +void cds_ja_range_get_values(const struct cds_ja_range *range, + uint64_t *start, uint64_t *end, void **priv) +{ + *start = range->start; + *end = range->end; + *priv = range->priv; +} + static struct cds_ja_range *range_create( uint64_t start, /* inclusive */ diff --git a/urcu/rcuja-range.h b/urcu/rcuja-range.h index 05ba08a..63035a1 100644 --- a/urcu/rcuja-range.h +++ b/urcu/rcuja-range.h @@ -45,6 +45,9 @@ int cds_ja_range_add(struct cds_ja *ja, int cds_ja_range_del(struct cds_ja *ja, struct cds_ja_range *range); +void cds_ja_range_get_values(const struct cds_ja_range *range, + uint64_t *start, uint64_t *end, void **priv); + struct cds_ja *_cds_ja_range_new(unsigned int key_bits, const struct rcu_flavor_struct *flavor);