Fix: rcuja merge fixes
[userspace-rcu.git] / urcu / rcuja-range.h
CommitLineData
748e8540
MD
1#ifndef _URCU_RCUJA_RANGE_H
2#define _URCU_RCUJA_RANGE_H
3
4/*
5 * urcu/rcuja-range.h
6 *
7 * Userspace RCU library - RCU Judy Array Range Support
8 *
9 * Copyright 2012-2013 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 *
11 * This library is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU Lesser General Public
13 * License as published by the Free Software Foundation; either
14 * version 2.1 of the License, or (at your option) any later version.
15 *
16 * This library is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * Lesser General Public License for more details.
20 *
21 * You should have received a copy of the GNU Lesser General Public
22 * License along with this library; if not, write to the Free Software
23 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
24 *
25 * Include this file _after_ including your URCU flavor.
26 */
27
28#include <urcu/rcuja.h>
748e8540
MD
29#include <stdint.h>
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
748e8540
MD
35struct cds_ja_range *cds_ja_range_lookup(struct cds_ja *ja, uint64_t key);
36
b45a45b9
MD
37struct cds_ja_range *cds_ja_range_lock(struct cds_ja_range *range);
38
39void cds_ja_range_unlock(struct cds_ja_range *range);
40
cd7eb7a3 41int cds_ja_range_add(struct cds_ja *ja,
748e8540 42 uint64_t start, /* inclusive */
fe8ad3da
MD
43 uint64_t end, /* inclusive */
44 void *priv);
748e8540
MD
45
46int cds_ja_range_del(struct cds_ja *ja, struct cds_ja_range *range);
47
03a50ae8
MD
48void cds_ja_range_get_values(const struct cds_ja_range *range,
49 uint64_t *start, uint64_t *end, void **priv);
50
63d2de6a
MD
51struct cds_ja *_cds_ja_range_new(unsigned int key_bits,
52 const struct rcu_flavor_struct *flavor);
678624e7
MD
53
54static inline
63d2de6a 55struct cds_ja *cds_ja_range_new(unsigned int key_bits)
678624e7 56{
63d2de6a 57 return _cds_ja_range_new(key_bits, &rcu_flavor);
678624e7
MD
58}
59
fe8ad3da
MD
60int cds_ja_range_destroy(struct cds_ja *ja,
61 void (*free_priv)(void *ptr));
678624e7 62
9a655aa8
MD
63int cds_ja_range_validate(struct cds_ja *ja);
64
748e8540
MD
65#ifdef __cplusplus
66}
67#endif
68
b2ca6f3b 69#endif /* _URCU_RCUJA_RANGE_H */
This page took 0.02464 seconds and 4 git commands to generate.