+ rp_free(rp);
+}
+
+void
+rp_detach(struct respool *rp)
+{
+ struct resource *r;
+ while (r = clist_head(&rp->resources))
+ {
+ ASSERT(r->rpool == rp);
+ res_detach(r);
+ }
+ rp_free(rp);
+}
+
+void
+rp_commit(struct respool *rp)
+{
+ struct resource *r;
+ while (r = clist_head(&rp->resources))
+ {
+ ASSERT(r->rpool == rp);
+ if (r->flags & RES_FLAG_TEMP)
+ res_free(r);
+ else
+ res_detach(r);
+ }
+ rp_free(rp);