This still needs implementation, validation tests, and doc updates to
be complete.

On Thu, Jun 1, 2017 at 5:52 AM, Matias Elo <matias....@nokia.com> wrote:
> A system may simultaneously support multiple huge page sizes. Add a new API
> function odp_sys_huge_page_size_all() which returns all supported page
> sizes. odp_sys_huge_page_size() stays unmodified to maintain backward
> compatibility.
>
> Signed-off-by: Matias Elo <matias....@nokia.com>

Reviewed-by: Bill Fischofer <bill.fischo...@linaro.org>

> ---
>  include/odp/api/spec/system_info.h | 19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)
>
> diff --git a/include/odp/api/spec/system_info.h 
> b/include/odp/api/spec/system_info.h
> index ca4dcdc..c41d3c5 100644
> --- a/include/odp/api/spec/system_info.h
> +++ b/include/odp/api/spec/system_info.h
> @@ -27,10 +27,29 @@ extern "C" {
>   * Default system huge page size in bytes
>   *
>   * @return Default huge page size in bytes
> + * @retval 0 on no huge pages
>   */
>  uint64_t odp_sys_huge_page_size(void);
>
>  /**
> + * System huge page sizes in bytes
> + *
> + * Returns the number of huge page sizes supported by the system. Outputs up 
> to
> + * 'num' sizes when the 'size' array pointer is not NULL. If return value is
> + * larger than 'num', there are more supported sizes than the function was
> + * allowed to output. If return value (N) is less than 'num', only sizes
> + * [0 ... N-1] have been written. Returned values are ordered from smallest 
> to
> + * largest.
> + *
> + * @param[out] size     Points to an array of huge page sizes for output
> + * @param      num      Maximum number of huge page sizes to output
> + *
> + * @return Number of supported huge page sizes
> + * @retval 0 on no huge pages
> + */
> +unsigned odp_sys_huge_page_size_all(uint64_t size[], unsigned num);
> +
> +/**
>   * Page size in bytes
>   *
>   * @return Page size in bytes
> --
> 2.7.4
>

Reply via email to