summaryrefslogtreecommitdiff
path: root/libhurd-slab
diff options
context:
space:
mode:
authormarcus <marcus>2004-03-21 17:35:01 +0000
committermarcus <marcus>2004-03-21 17:35:01 +0000
commita363154c220f939e7a86eef0214fd2144d079857 (patch)
tree5fbb80050598fc0b31b7e9e3280468e9c780459d /libhurd-slab
parent06881769c12b963da3372ecf7a71424c3a9a80ac (diff)
2004-03-21 Marcus Brinkmann <marcus@gnu.org>
* slab.h (hurd_slab_destroy): New prototype. * slab.c (hurd_slab_destroy): Dummy implementation.
Diffstat (limited to 'libhurd-slab')
-rw-r--r--libhurd-slab/ChangeLog5
-rw-r--r--libhurd-slab/slab.c12
-rw-r--r--libhurd-slab/slab.h4
3 files changed, 20 insertions, 1 deletions
diff --git a/libhurd-slab/ChangeLog b/libhurd-slab/ChangeLog
index c76bb21..475e75d 100644
--- a/libhurd-slab/ChangeLog
+++ b/libhurd-slab/ChangeLog
@@ -1,3 +1,8 @@
+2004-03-21 Marcus Brinkmann <marcus@gnu.org>
+
+ * slab.h (hurd_slab_destroy): New prototype.
+ * slab.c (hurd_slab_destroy): Dummy implementation.
+
2003-10-11 Marcus Brinkmann <marcus@gnu.org>
* slab.h (hurd_slab_constructor_t): Add new HOOK argument.
diff --git a/libhurd-slab/slab.c b/libhurd-slab/slab.c
index 3005467..3aaa609 100644
--- a/libhurd-slab/slab.c
+++ b/libhurd-slab/slab.c
@@ -63,7 +63,7 @@ struct hurd_slab
/* The reference counter holds the number of allocated chunks in
the slab. When the counter is zero, all chunks are free and
- the slab can be reqlinquished. */
+ the slab can be relinquished. */
int refcount;
/* Single linked list of free buffers in the slab. */
@@ -341,6 +341,16 @@ hurd_slab_create (size_t size, size_t alignment,
}
+/* Destroy all objects and the slab space SPACE. Returns EBUSY if
+ there are still allocated objects in the slab. */
+error_t
+hurd_slab_destroy (hurd_slab_space_t space)
+{
+ /* FIXME: Implement me. */
+ return ENOSYS;
+}
+
+
/* Allocate a new object from the slab space SPACE. */
error_t
hurd_slab_alloc (hurd_slab_space_t space, void **buffer)
diff --git a/libhurd-slab/slab.h b/libhurd-slab/slab.h
index 35bbdd7..342aa8b 100644
--- a/libhurd-slab/slab.h
+++ b/libhurd-slab/slab.h
@@ -47,6 +47,10 @@ error_t hurd_slab_create (size_t size, size_t alignment,
void *hook,
hurd_slab_space_t *space);
+/* Destroy all objects and the slab space SPACE. Returns EBUSY if
+ there are still allocated objects in the slab. */
+error_t hurd_slab_destroy (hurd_slab_space_t space);
+
/* Allocate a new object from the slab space SPACE. */
error_t hurd_slab_alloc (hurd_slab_space_t space, void **buffer);