summaryrefslogtreecommitdiffstats
path: root/firmware/include
diff options
context:
space:
mode:
authorThomas Jarosch <tomj@simonv.com>2014-12-29 23:36:50 +0100
committerThomas Jarosch <tomj@simonv.com>2014-12-29 23:49:12 +0100
commitda5a36d6d298de44da687797f7547ab17b58d043 (patch)
tree61395e9c7e7b02ec44b1dcda8c4fa2c0d3a9aed9 /firmware/include
parent193c5df75d3b6d9e3442e42fa26fd8ccc4c5e3aa (diff)
downloadrockbox-da5a36d6d298de44da687797f7547ab17b58d043.tar.gz
rockbox-da5a36d6d298de44da687797f7547ab17b58d043.tar.bz2
rockbox-da5a36d6d298de44da687797f7547ab17b58d043.zip
Document 'union buflib_data'
Change-Id: Ia98fa8e7887338d6c0b7a5795a0ae5c7a13014ba
Diffstat (limited to 'firmware/include')
-rw-r--r--firmware/include/buflib.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/firmware/include/buflib.h b/firmware/include/buflib.h
index d1ff58720b..50722bb351 100644
--- a/firmware/include/buflib.h
+++ b/firmware/include/buflib.h
@@ -35,12 +35,15 @@
union buflib_data
{
- intptr_t val;
- char name[1]; /* actually a variable sized string */
- struct buflib_callbacks* ops;
- char* alloc;
- union buflib_data *handle;
- uint32_t crc;
+ intptr_t val; /* length of the block in n*sizeof(union buflib_data).
+ Includes buflib metadata overhead. A negative value
+ indicates block is unallocated */
+ char name[1]; /* name, actually a variable sized string */
+ struct buflib_callbacks* ops; /* callback functions for move and shrink. Can be NULL */
+ char* alloc; /* start of allocated memory area */
+ union buflib_data *handle; /* pointer to entry in the handle table.
+ Used during compaction for fast lookup */
+ uint32_t crc; /* checksum of this data to detect corruption */
};
struct buflib_context