@@ -18,7 +18,6 @@
extern "C" {
#endif
-#include <sys/types.h>
#include <odp/config.h>
/** @addtogroup odp_scheduler
@@ -50,7 +49,7 @@ void odp_cpumask_from_str(odp_cpumask_t *mask, const char *str);
* @return number of characters written (including terminating null char)
* @retval <0 on failure (buffer too small)
*/
-ssize_t odp_cpumask_to_str(const odp_cpumask_t *mask, char *str, ssize_t size);
+int32_t odp_cpumask_to_str(const odp_cpumask_t *mask, char *str, int32_t size);
/**
* Clear entire CPU mask
@@ -8,7 +8,6 @@
#define _GNU_SOURCE
#endif
#include <sched.h>
-#include <sys/types.h>
#include <odp/cpumask.h>
#include <odp_debug_internal.h>
@@ -61,7 +60,7 @@ void odp_cpumask_from_str(odp_cpumask_t *mask, const char *str_in)
memcpy(&mask->set, &cpuset, sizeof(cpuset));
}
-ssize_t odp_cpumask_to_str(const odp_cpumask_t *mask, char *str, ssize_t len)
+int32_t odp_cpumask_to_str(const odp_cpumask_t *mask, char *str, int32_t len)
{
char *p = str;
int cpu = odp_cpumask_last(mask);
ssize_t is a POSIX type. API definition must be pure C (C99). Signed 32 bits can hold larger values than size_t (64k) and ssize_t(32k) in minimum. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> --- include/odp/api/cpumask.h | 3 +-- platform/linux-generic/odp_cpumask.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-)