> -----Original Message-----
> From: lng-odp-boun...@lists.linaro.org [mailto:lng-odp-
> boun...@lists.linaro.org] On Behalf Of ext Mike Holmes
> Sent: Saturday, January 31, 2015 3:21 PM
> To: lng-odp@lists.linaro.org
> Subject: [lng-odp] [PATCH 1/2] api: config: move ODP_SHM_NUM_BLOCKS to
> config.h
> 
> ODP_SHM_NUM_BLOCKS was defined down in the implementation, move it out
> to the config.h
> 
> Signed-off-by: Mike Holmes <mike.hol...@linaro.org>
> ---
>  include/odp/api/config.h                   | 6 ++++++
>  platform/linux-generic/odp_shared_memory.c | 5 +----
>  2 files changed, 7 insertions(+), 4 deletions(-)
> 
> diff --git a/include/odp/api/config.h b/include/odp/api/config.h
> index 3529fca..16157b0 100644
> --- a/include/odp/api/config.h
> +++ b/include/odp/api/config.h
> @@ -119,6 +119,12 @@ extern "C" {
>   */
>  #define ODP_CONFIG_PACKET_BUF_LEN_MAX (ODP_CONFIG_PACKET_BUF_LEN_MIN*6)
> 
> +/** Maximum number of shared memory blocks.
> + *
> + * Limits how many blocks are available for calls to odp_shm_reserve()
> + */
> +#define ODP_SHM_NUM_BLOCKS 32


All config macros must have ODP_CONFIG_ prefix. So rename it to this:

#define ODP_CONFIG_SHM_BLOCKS 64


-Petri


> +
>  /**
>   * @}
>   */
> diff --git a/platform/linux-generic/odp_shared_memory.c b/platform/linux-
> generic/odp_shared_memory.c
> index 96d10e8..e157871 100644
> --- a/platform/linux-generic/odp_shared_memory.c
> +++ b/platform/linux-generic/odp_shared_memory.c
> @@ -15,6 +15,7 @@
>  #include <odp/debug.h>
>  #include <odp_debug_internal.h>
>  #include <odp_align_internal.h>
> +#include <odp/config.h>
> 
>  #include <unistd.h>
>  #include <sys/mman.h>
> @@ -26,10 +27,6 @@
>  #include <string.h>
>  #include <errno.h>
> 
> -
> -#define ODP_SHM_NUM_BLOCKS 32
> -
> -
>  typedef struct {
>       char      name[ODP_SHM_NAME_LEN];
>       uint64_t  size;
> --
> 2.1.0
> 
> 
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/lng-odp

_______________________________________________
lng-odp mailing list
lng-odp@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to