jlaitine commented on code in PR #8026: URL: https://github.com/apache/nuttx/pull/8026#discussion_r1061195452
########## include/nuttx/mm/map.h: ########## @@ -80,4 +80,137 @@ struct mm_map_s * Public Function Prototypes ****************************************************************************/ -#endif /* __INCLUDE_NUTTX_MM_MM_MAP_H */ +#ifdef CONFIG_MM_MAP + +/**************************************************************************** + * Name: mm_map_initialize + * + * Description: + * Initialization function, called only by group_initialize + * + * Input Parameters: + * mm - Pointer to the mm_map structure to be initialized + * + * Returned Value: + * None + * + ****************************************************************************/ + +void mm_map_initialize(FAR struct mm_map_s *mm); + +/**************************************************************************** + * Name: mm_map_destroy + * + * Description: + * Uninitialization function, called only by group_release + * + * Input Parameters: + * mm - Pointer to the mm_map structure to be initialized + * + * Returned Value: + * None + * + ****************************************************************************/ + +void mm_map_destroy(FAR struct mm_map_s *mm); + +/**************************************************************************** + * Name: mm_map_add + * + * Description: + * Adds a virtual memory area into the list of mappings + * + * Input Parameters: + * entry - A pointer to mm_map_entry_s, mapping info to be added + * + * Returned Value: + * OK Added succesfully + * -EINVAL: Invalid attempt to get the semaphore + * -EINTR: The wait was interrupted by the receipt of a signal. + * -ENOMEM: Out of memory + * + ****************************************************************************/ + +int mm_map_add(FAR struct mm_map_entry_s *entry); + +/**************************************************************************** + * Name: mm_map_next + * + * Description: + * Returns the next mapping in the list, following the argument. + * Can be used to iterate through all the mappings. Returns the first + * mapping when the argument "entry" is NULL. + * + * Input Parameters: + * entry - Pointer to a single mapping in this task group or NULL to get + * the first one + * + * Returned Value: + * Pointer to the next mapping + * + ****************************************************************************/ + +FAR struct mm_map_entry_s *mm_map_next( + FAR const struct mm_map_entry_s *entry); + +/**************************************************************************** + * Name: mm_map_find_contains + * + * Description: + * Find the first mapping containing an address from the task + * group's list + * + * Input Parameters: + * vaddr - Address within the mapped area + * + * Returned Value: + * Pointer to the mapping, NULL if not found + * + ****************************************************************************/ + +FAR struct mm_map_entry_s *mm_map_find_contains(FAR const void *vaddr); Review Comment: yes, will do -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org