summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorPeter Mitsis <peter.mitsis@windriver.com>2016-10-07 13:50:31 -0400
committerBenjamin Walsh <benjamin.walsh@windriver.com>2016-10-18 15:31:51 +0000
commit578f9111ed7cd68b3126c426fdff85a2d0f74c53 (patch)
tree21c9c55db98c56a70f20d1d844ee7e3c678ae44a /kernel
parentc001aa8ef66f2ccd9f64a139044b5287aae30a7a (diff)
unified: Tweak mem_map API parameters
- Reorders parameters where necessary - Adds buffer alignment parameter to K_MEM_MAP_DEFINE() Change-Id: Ifa1a09c62492cd6db8bdd83f31a5ca5ba072b484 Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/unified/mem_map.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/kernel/unified/mem_map.c b/kernel/unified/mem_map.c
index 7c19e2094..7450787ab 100644
--- a/kernel/unified/mem_map.c
+++ b/kernel/unified/mem_map.c
@@ -75,14 +75,14 @@ static int init_mem_map_module(struct device *dev)
* Initializes the memory map and creates its list of free blocks.
*
* @param map Address of memory map.
- * @param num_blocks Number of blocks.
- * @param block_size Size of each block, in bytes.
* @param buffer Pointer to buffer used for the blocks.
+ * @param block_size Size of each block, in bytes.
+ * @param num_blocks Number of blocks.
*
* @return N/A
*/
-void k_mem_map_init(struct k_mem_map *map, int num_blocks, int block_size,
- void *buffer)
+void k_mem_map_init(struct k_mem_map *map, void *buffer,
+ int block_size, int num_blocks)
{
map->num_blocks = num_blocks;
map->block_size = block_size;
@@ -100,9 +100,9 @@ void k_mem_map_init(struct k_mem_map *map, int num_blocks, int block_size,
*
* @param map Pointer to memory map object.
* @param mem Pointer to area to receive block address.
- * @param timeout Maximum time (nanoseconds) to wait for allocation to complete.
- * Use K_NO_WAIT to return immediately, or K_FOREVER to wait as long as
- * necessary.
+ * @param timeout Maximum time (milliseconds) to wait for allocation to
+ * complete. Use K_NO_WAIT to return immediately, or K_FOREVER to wait
+ * as long as necessary.
*
* @return 0 if successful, -ENOMEM if failed immediately, -EAGAIN if timed out
*/