Add element acquire/release capabilities to rtree.

This makes it possible to acquire short-term "ownership" of rtree
elements so that it is possible to read an extent pointer *and* read the
extent's contents with a guarantee that the element will not be modified
until the ownership is released.  This is intended as a mechanism for
resolving rtree read/write races rather than as a way to lock extents.
This commit is contained in:
Jason Evans
2016-03-28 03:06:35 -07:00
parent f4a58847d3
commit 2d2b4e98c9
6 changed files with 302 additions and 135 deletions

View File

@@ -87,7 +87,7 @@ JEMALLOC_INLINE extent_t *
chunk_lookup(const void *ptr, bool dependent)
{
return (rtree_get(&chunks_rtree, (uintptr_t)ptr, dependent));
return (rtree_read(&chunks_rtree, (uintptr_t)ptr, dependent));
}
#endif