summaryrefslogtreecommitdiff
path: root/cesar/lib/blk.h
diff options
context:
space:
mode:
Diffstat (limited to 'cesar/lib/blk.h')
-rw-r--r--cesar/lib/blk.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/cesar/lib/blk.h b/cesar/lib/blk.h
index 2726fe1afd..1f6a186ba0 100644
--- a/cesar/lib/blk.h
+++ b/cesar/lib/blk.h
@@ -30,7 +30,7 @@
* The user can request one or more chained blocks and will be given pointers
* to descriptors. The second one works directly with data, hiding the
* descriptor to the user. In the second flavor, only one block can be
- * requested at a time.
+ * requested at a time, and performances can be lower as usage should be rare.
*
* An extra feature is provided for block allocated without a descriptor:
* automatic destruction. In this case, the descriptor is used to store the
@@ -49,11 +49,8 @@
/** A block descriptor is 16 bytes, that is greater than \c blk_t. */
#define BLK_DESC_SIZE 16
-/** A block descriptor reference counter is 4 bytes. */
-#define BLK_REFCNT_SIZE 4
-
/** Memory block descriptor.
- * This structure store information about a 512 byte memory block. This
+ * This structure stores information about a 512 byte memory block. This
* representation is shared between hardware and software. */
struct blk_t
{
@@ -69,14 +66,19 @@ typedef struct blk_t blk_t;
* \param data pointer to block data
*
* Destructor feature can only be used with block returned without a
- * descriptor as the it is then used internally to store the destructor
- * pointer.
+ * descriptor as it is then used internally to store the destructor pointer.
*/
typedef void (*blk_destructor_t) (void *data);
BEGIN_DECLS
/**
+ * Initialise the block allocator.
+ */
+void
+blk_init (void);
+
+/**
* Return a newly allocated 512 byte block with its descriptor.
* \return the descriptor pointer
*