summaryrefslogtreecommitdiff
path: root/lib/resource.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/resource.h')
-rw-r--r--lib/resource.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/resource.h b/lib/resource.h
index 810334c1..06af4289 100644
--- a/lib/resource.h
+++ b/lib/resource.h
@@ -76,6 +76,9 @@ void rp_free(pool *p); /* Free the whole pool */
extern pool root_pool;
+static inline pool *resource_parent(resource *r)
+{ return SKIP_BACK(pool, inside, resource_enlisted(r)); }
+
/* Normal memory blocks */
void *mb_alloc(pool *, unsigned size);