On Tue, 2017-02-28 at 08:12 +0000, Savolainen, Petri (Nokia - FI/Espoo) wrote:

[nip]

> /**
>  * @def ODP_CPUMASK_SIZE
>  * Maximum cpumask size, this definition limits the number of individual CPUs
>  * that can be accessed in this system.
>  */
> 
> It cannot be removed, it's part of API. Just need to find a way to set it to
> CPU_SETSIZE (on Linux systems). ODP API spec is OS agnostic. The same
> application code should run also on non-Linux implementations (e.g. ODP API
> spec cannot refer to CPU_SETSIZE). The assert is needed as long as
> ODP_CPUMASK_SIZE value is not set from CPU_SETSIZE.
> 
> -Petri 
> 
I thought it could not be removed as well.
What about something like this...

====
#ifdef __unix__

#define _GNU_SOURCE
#include <sched.h>
#define ODP_CPUMASK_SIZE CPU_SETSIZE

#elif

#define ODP_CPUMASK_SIZE 1024

#endif

#define ODP_CPUMASK_STR_SIZE ((ODP_CPUMASK_SIZE + 3) / 4 + 3)
====

However, something is going on with the ODP build system since it cannot find
CPU_SETSIZE (/usr/include/sched.h)... 


Cheers,
Marco

Reply via email to