summaryrefslogtreecommitdiff
path: root/rtl-obj-comp.h
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2012-12-18 20:33:17 +1100
committerChris Johns <chrisj@rtems.org>2012-12-18 20:33:17 +1100
commit16de1256c028588c7e2159801d3c70a9a0e432b2 (patch)
treec86f2cbec8dc683ccef0fd90ad3cc1344b826548 /rtl-obj-comp.h
parent39993d58eaf41159ee18110542a2c5f88e0df82c (diff)
Update the output buffer pointer when looping.
Fix a bug where the output buffer pointer is not updated when looping. Add read stats for the trace code.
Diffstat (limited to 'rtl-obj-comp.h')
-rw-r--r--rtl-obj-comp.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/rtl-obj-comp.h b/rtl-obj-comp.h
index eb4ba55..6034602 100644
--- a/rtl-obj-comp.h
+++ b/rtl-obj-comp.h
@@ -53,9 +53,18 @@ typedef struct rtems_rtl_obj_cpmp_s
size_t size; /**< The size of the output buffer. */
size_t level; /**< The amount of data in the buffer. */
uint8_t* buffer; /**< The buffer */
+ uint32_t read; /**< The amount of data read. */
} rtems_rtl_obj_comp_t;
/**
+ * Return the input level.
+ */
+static inline uint32_t rtems_rtl_obj_comp_input (rtems_rtl_obj_comp_t* comp)
+{
+ return comp->read;
+}
+
+/**
* Open a compressor allocating the output buffer.
*
* @param comp The compressor to initialise.