Improve doxygen documentation.
This commit is contained in:
+35
-28
@@ -16,6 +16,41 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/** @file
|
||||
* mbuf - A managed message/memory buffer.
|
||||
*
|
||||
* Concept:
|
||||
@verbatim
|
||||
<--------- allocated ----------->
|
||||
<--- len -->
|
||||
+--------------------------------+
|
||||
|Headroom| Data |Tailroom |
|
||||
+--------------------------------+
|
||||
^ ^ ^
|
||||
| | |
|
||||
| | tail
|
||||
| head
|
||||
bufstart
|
||||
|
||||
@endverbatim
|
||||
*
|
||||
* Initially when empty, head == tail, and the length is 0.
|
||||
* Data is added to the tail.
|
||||
*
|
||||
* If head == bufstart, there is no headroom
|
||||
* if tail points one past the allocated space, there is no
|
||||
* tailroom (the buffer is full)
|
||||
*
|
||||
* Conventions:
|
||||
* push - prepend data to the buffer (in the head room part)
|
||||
* (move head to the left)
|
||||
* pull - remove data from the beginning of the message.
|
||||
* (move head to the right)
|
||||
* put - Add data to the buffer.
|
||||
* (move tail to the right)
|
||||
*/
|
||||
|
||||
/** Flags used internally */
|
||||
enum UC_MBUF_FLAGS {
|
||||
UC_MBUF_FL_MALLOC = 0x0001, //MBuf and MBuf->bufstart are seperatly malloc'd
|
||||
UC_MBUF_FL_MALLOC_BUF = 0x0001, //MBuf is not malloc'd. MBuf->bufstart is malloc'd
|
||||
@@ -51,34 +86,6 @@ struct MBuf {
|
||||
uint8_t inline_data[0];
|
||||
};
|
||||
|
||||
/**
|
||||
* Concept:
|
||||
* <--------- allocated ----------->
|
||||
* <--- len -->
|
||||
* +--------------------------------+
|
||||
* |Headroom| Data |Tailroom |
|
||||
* +--------------------------------+
|
||||
* ^ ^ ^
|
||||
* | | |
|
||||
* | | tail
|
||||
* | head
|
||||
* bufstart
|
||||
*
|
||||
* Initially when empty, head == tail, and the length is 0.
|
||||
* Data is added to the tail.
|
||||
*
|
||||
* If head == bufstart, there is no headroom
|
||||
* if tail points one past the allocated space, there is no
|
||||
* tailroom (the buffer is full)
|
||||
*
|
||||
* Conventions:
|
||||
* push - prepend data to the buffer (in the head room part)
|
||||
* (move head to the left)
|
||||
* pull - remove data from the beginning of the message.
|
||||
* (move head to the right)
|
||||
* put - Add data to the buffer.
|
||||
* (move tail to the right)
|
||||
*/
|
||||
|
||||
/** Allocate an mbuf with a length and headroom,
|
||||
* the buffer will have the flag UC_MBUF_FL_MALLOC
|
||||
|
||||
Reference in New Issue
Block a user