Reviewed-by: Petri Savolainen <[email protected]>
> -----Original Message----- > From: lng-odp [mailto:[email protected]] On Behalf Of > Matias Elo > Sent: Thursday, June 01, 2017 1:53 PM > To: [email protected] > Subject: Suspected SPAM - [lng-odp] [API-NEXT PATCH] api: system_info: add > function for fetching all supported huge page sizes > > 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 <[email protected]> > --- > 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
