diff mbox

[v3,4/4] linux-generic: shared_memory: static assert on ODP_CONFIG_SHM_BLOCKS size

Message ID 1424806074-26864-4-git-send-email-mike.holmes@linaro.org
State Superseded
Headers show

Commit Message

Mike Holmes Feb. 24, 2015, 7:27 p.m. UTC
Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
---
 platform/linux-generic/odp_shared_memory.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox

Patch

diff --git a/platform/linux-generic/odp_shared_memory.c b/platform/linux-generic/odp_shared_memory.c
index 1eb288e..1ab8a2c 100644
--- a/platform/linux-generic/odp_shared_memory.c
+++ b/platform/linux-generic/odp_shared_memory.c
@@ -27,6 +27,9 @@ 
 #include <string.h>
 #include <errno.h>
 
+_ODP_STATIC_ASSERT(ODP_CONFIG_SHM_BLOCKS >= ODP_CONFIG_POOLS,
+		   "ODP_CONFIG_SHM_BLOCKS < ODP_CONFIG_POOLS");
+
 typedef struct {
 	char      name[ODP_SHM_NAME_LEN];
 	uint64_t  size;