summaryrefslogtreecommitdiffstats
path: root/lib/resource.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/resource.c')
-rw-r--r--lib/resource.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/resource.c b/lib/resource.c
index a51e3ca..2a1ad62 100644
--- a/lib/resource.c
+++ b/lib/resource.c
@@ -107,6 +107,26 @@ pool_lookup(resource *P, unsigned long a)
}
/**
+ * rmove - move a resource
+ * @res: resource
+ * @p: pool to move the resource to
+ *
+ * rmove() moves a resource from one pool to another.
+ */
+
+void rmove(void *res, pool *p)
+{
+ resource *r = res;
+
+ if (r)
+ {
+ if (r->n.next)
+ rem_node(&r->n);
+ add_tail(&p->inside, &r->n);
+ }
+}
+
+/**
* rfree - free a resource
* @res: resource
*