31bce15a727a77e24e9f1906995629e60f7b6dea
1 #ifndef _URCU_RCUJA_RANGE_H
2 #define _URCU_RCUJA_RANGE_H
7 * Userspace RCU library - RCU Judy Array Range Support
9 * Copyright 2012-2013 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
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.
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.
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
25 * Include this file _after_ including your URCU flavor.
28 #include <urcu/rcuja.h>
36 enum cds_ja_range_type
{
37 CDS_JA_RANGE_ALLOCATED
,
43 * Range goes from start (inclusive) to end (inclusive).
44 * Range start is used as node key in the Judy array.
48 struct cds_ja_node ja_node
;
50 enum cds_ja_range_type type
;
54 int cds_ja_range_init(struct cds_ja
*ja
);
55 int cds_ja_range_fini(struct cds_ja
*ja
);
57 struct cds_ja_range
*cds_ja_range_lookup(struct cds_ja
*ja
, uint64_t key
);
59 struct cds_ja_range
*cds_ja_range_lock(struct cds_ja_range
*range
);
61 void cds_ja_range_unlock(struct cds_ja_range
*range
);
63 struct cds_ja_range
*cds_ja_range_add(struct cds_ja
*ja
,
64 uint64_t start
, /* inclusive */
65 uint64_t end
); /* inclusive */
67 int cds_ja_range_del(struct cds_ja
*ja
, struct cds_ja_range
*range
);
73 #endif /* _URCU_RCUJA_H */
This page took 0.049658 seconds and 4 git commands to generate.