Message ID | 1446128307-9588-1-git-send-email-anders.roxell@linaro.org |
---|---|
State | Accepted |
Commit | 3f20cb3393909ffa71a541841e7f2ba3ac0261fe |
Headers | show |
On 2015-10-29 15:18, Anders Roxell wrote: > The API definition of a CPU mask must not be incompatible with the > platform it is implemented on > > Signed-off-by: Anders Roxell <anders.roxell@linaro.org> > --- > platform/linux-generic/odp_cpumask.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/platform/linux-generic/odp_cpumask.c b/platform/linux-generic/odp_cpumask.c > index b31e1ca..5cd6a38 100644 > --- a/platform/linux-generic/odp_cpumask.c > +++ b/platform/linux-generic/odp_cpumask.c > @@ -16,6 +16,10 @@ > #include <stdlib.h> > #include <string.h> > > +/** @internal Compile time assert */ > +_ODP_STATIC_ASSERT(CPU_SETSIZE >= ODP_CPUMASK_SIZE, > + "ODP_CPUMASK_SIZE__SIZE_ERROR"); > + > void odp_cpumask_from_str(odp_cpumask_t *mask, const char *str_in) > { > cpu_set_t cpuset; > -- > 2.1.4 > ping
On 29 October 2015 at 10:18, Anders Roxell <anders.roxell@linaro.org> wrote: > The API definition of a CPU mask must not be incompatible with the > platform it is implemented on > > Signed-off-by: Anders Roxell <anders.roxell@linaro.org> > For the series I dont think ODP should limit the maximum number of threads, it could be greater than the number of cores if the application is happy with the compromise. It should assert if the platform mask can't cope with the API definition of a mask however Reviewed-by: Mike Holmes <mike.holmes@linaro.org> > --- > platform/linux-generic/odp_cpumask.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/platform/linux-generic/odp_cpumask.c > b/platform/linux-generic/odp_cpumask.c > index b31e1ca..5cd6a38 100644 > --- a/platform/linux-generic/odp_cpumask.c > +++ b/platform/linux-generic/odp_cpumask.c > @@ -16,6 +16,10 @@ > #include <stdlib.h> > #include <string.h> > > +/** @internal Compile time assert */ > +_ODP_STATIC_ASSERT(CPU_SETSIZE >= ODP_CPUMASK_SIZE, > + "ODP_CPUMASK_SIZE__SIZE_ERROR"); > + > void odp_cpumask_from_str(odp_cpumask_t *mask, const char *str_in) > { > cpu_set_t cpuset; > -- > 2.1.4 > > _______________________________________________ > lng-odp mailing list > lng-odp@lists.linaro.org > https://lists.linaro.org/mailman/listinfo/lng-odp > -- Mike Holmes Technical Manager - Linaro Networking Group Linaro.org <http://www.linaro.org/> *│ *Open source software for ARM SoCs
Merged, Maxim. On 11/06/2015 21:34, Mike Holmes wrote: > > > On 29 October 2015 at 10:18, Anders Roxell <anders.roxell@linaro.org > <mailto:anders.roxell@linaro.org>> wrote: > > The API definition of a CPU mask must not be incompatible with the > platform it is implemented on > > Signed-off-by: Anders Roxell <anders.roxell@linaro.org > <mailto:anders.roxell@linaro.org>> > > > For the series > > I dont think ODP should limit the maximum number of threads, it could > be greater than the number of cores if the application is happy with > the compromise. It should assert if the platform mask can't cope with > the API definition of a mask however > > Reviewed-by: Mike Holmes <mike.holmes@linaro.org > <mailto:mike.holmes@linaro.org>> > > --- > platform/linux-generic/odp_cpumask.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/platform/linux-generic/odp_cpumask.c > b/platform/linux-generic/odp_cpumask.c > index b31e1ca..5cd6a38 100644 > --- a/platform/linux-generic/odp_cpumask.c > +++ b/platform/linux-generic/odp_cpumask.c > @@ -16,6 +16,10 @@ > #include <stdlib.h> > #include <string.h> > > +/** @internal Compile time assert */ > +_ODP_STATIC_ASSERT(CPU_SETSIZE >= ODP_CPUMASK_SIZE, > + "ODP_CPUMASK_SIZE__SIZE_ERROR"); > + > void odp_cpumask_from_str(odp_cpumask_t *mask, const char *str_in) > { > cpu_set_t cpuset; > -- > 2.1.4 > > _______________________________________________ > lng-odp mailing list > lng-odp@lists.linaro.org <mailto:lng-odp@lists.linaro.org> > https://lists.linaro.org/mailman/listinfo/lng-odp > > > > > -- > Mike Holmes > Technical Manager - Linaro Networking Group > Linaro.org <http://www.linaro.org/>***│ *Open source software for ARM SoCs > > > > _______________________________________________ > lng-odp mailing list > lng-odp@lists.linaro.org > https://lists.linaro.org/mailman/listinfo/lng-odp
Merged, Maxim. On 11/06/2015 21:34, Mike Holmes wrote: > > > On 29 October 2015 at 10:18, Anders Roxell <anders.roxell@linaro.org > <mailto:anders.roxell@linaro.org>> wrote: > > The API definition of a CPU mask must not be incompatible with the > platform it is implemented on > > Signed-off-by: Anders Roxell <anders.roxell@linaro.org > <mailto:anders.roxell@linaro.org>> > > > For the series > > I dont think ODP should limit the maximum number of threads, it could > be greater than the number of cores if the application is happy with > the compromise. It should assert if the platform mask can't cope with > the API definition of a mask however > > Reviewed-by: Mike Holmes <mike.holmes@linaro.org > <mailto:mike.holmes@linaro.org>> > > --- > platform/linux-generic/odp_cpumask.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/platform/linux-generic/odp_cpumask.c > b/platform/linux-generic/odp_cpumask.c > index b31e1ca..5cd6a38 100644 > --- a/platform/linux-generic/odp_cpumask.c > +++ b/platform/linux-generic/odp_cpumask.c > @@ -16,6 +16,10 @@ > #include <stdlib.h> > #include <string.h> > > +/** @internal Compile time assert */ > +_ODP_STATIC_ASSERT(CPU_SETSIZE >= ODP_CPUMASK_SIZE, > + "ODP_CPUMASK_SIZE__SIZE_ERROR"); > + > void odp_cpumask_from_str(odp_cpumask_t *mask, const char *str_in) > { > cpu_set_t cpuset; > -- > 2.1.4 > > _______________________________________________ > lng-odp mailing list > lng-odp@lists.linaro.org <mailto:lng-odp@lists.linaro.org> > https://lists.linaro.org/mailman/listinfo/lng-odp > > > > > -- > Mike Holmes > Technical Manager - Linaro Networking Group > Linaro.org <http://www.linaro.org/>***│ *Open source software for ARM SoCs > > > > _______________________________________________ > lng-odp mailing list > lng-odp@lists.linaro.org > https://lists.linaro.org/mailman/listinfo/lng-odp
diff --git a/platform/linux-generic/odp_cpumask.c b/platform/linux-generic/odp_cpumask.c index b31e1ca..5cd6a38 100644 --- a/platform/linux-generic/odp_cpumask.c +++ b/platform/linux-generic/odp_cpumask.c @@ -16,6 +16,10 @@ #include <stdlib.h> #include <string.h> +/** @internal Compile time assert */ +_ODP_STATIC_ASSERT(CPU_SETSIZE >= ODP_CPUMASK_SIZE, + "ODP_CPUMASK_SIZE__SIZE_ERROR"); + void odp_cpumask_from_str(odp_cpumask_t *mask, const char *str_in) { cpu_set_t cpuset;
The API definition of a CPU mask must not be incompatible with the platform it is implemented on Signed-off-by: Anders Roxell <anders.roxell@linaro.org> --- platform/linux-generic/odp_cpumask.c | 4 ++++ 1 file changed, 4 insertions(+)