You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by we...@apache.org on 2016/08/11 21:27:40 UTC

[40/50] [abbrv] incubator-mynewt-core git commit: util - Fix up mem function comments.

util - Fix up mem function comments.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/e5413e6c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/e5413e6c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/e5413e6c

Branch: refs/heads/phyrx_no_mbuf
Commit: e5413e6c7cdb7decac233d62c08250d861a5fe01
Parents: 2697a4f
Author: Christopher Collins <cc...@apache.org>
Authored: Tue Aug 9 11:16:17 2016 -0700
Committer: William San Filippo <wi...@runtime.io>
Committed: Thu Aug 11 14:26:26 2016 -0700

----------------------------------------------------------------------
 libs/util/src/mem.c | 22 +++++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/e5413e6c/libs/util/src/mem.c
----------------------------------------------------------------------
diff --git a/libs/util/src/mem.c b/libs/util/src/mem.c
index eeca71f..faf8234 100644
--- a/libs/util/src/mem.c
+++ b/libs/util/src/mem.c
@@ -67,7 +67,9 @@ mem_malloc_mempool(struct os_mempool *mempool, int num_blocks, int block_size,
 }
 
 /**
- * Mallocs a block of memory and initializes an mbuf pool to use it.
+ * Mallocs a block of memory and initializes an mbuf pool to use it.  The
+ * specified block_size indicates the size of an mbuf acquired from the pool if
+ * it does not contain a pkthdr.
  *
  * @param mempool               The mempool to initialize.
  * @param mbuf_pool             The mbuf pool to initialize.
@@ -111,6 +113,24 @@ mem_malloc_mbuf_pool(struct os_mempool *mempool,
     return 0;
 }
 
+/**
+ * Mallocs a block of memory and initializes an mbuf pool to use it.  The
+ * specified block_size indicates the size of an mbuf acquired from the pool if
+ * it contains a pkthdr.
+ *
+ * @param mempool               The mempool to initialize.
+ * @param mbuf_pool             The mbuf pool to initialize.
+ * @param num_blocks            The total number of mbufs in the pool.
+ * @param block_size            The size of each mbuf.
+ * @param name                  The name to give the mempool.
+ * @param out_buf               On success, this points to the malloced memory.
+ *                                  Pass NULL if you don't need this
+ *                                  information.
+ *
+ * @return                      0 on success;
+ *                              OS_ENOMEM on malloc failure;
+ *                              Other OS code on unexpected error.
+ */
 int
 mem_malloc_mbufpkt_pool(struct os_mempool *mempool,
                         struct os_mbuf_pool *mbuf_pool, int num_blocks,