diff mbox

[API-NEXT,PATCHv4,08/16] linux-gen: shm: new ODP_SHM_LOCK flag implementation

Message ID 1477301053-35938-9-git-send-email-christophe.milard@linaro.org
State New
Headers show

Commit Message

Christophe Milard Oct. 24, 2016, 9:24 a.m. UTC
The flag locks the allocated memory (prevent swapping)
The patch just exposes the _ODP_ISHM_LOCK flag of the internal memory
allocator, ishm.

Signed-off-by: Christophe Milard <christophe.milard@linaro.org>

---
 platform/linux-generic/odp_shared_memory.c | 1 +
 1 file changed, 1 insertion(+)

-- 
2.7.4
diff mbox

Patch

diff --git a/platform/linux-generic/odp_shared_memory.c b/platform/linux-generic/odp_shared_memory.c
index 0513047..30ef9d9 100644
--- a/platform/linux-generic/odp_shared_memory.c
+++ b/platform/linux-generic/odp_shared_memory.c
@@ -44,6 +44,7 @@  odp_shm_t odp_shm_reserve(const char *name, uint64_t size, uint64_t align,
 	/* set internal ishm flags according to API flags: */
 	flgs |= (flags & ODP_SHM_PROC) ? _ODP_ISHM_LINK : 0;
 	flgs |= (flags & ODP_SHM_SINGLE_VA) ? _ODP_ISHM_SINGLE_VA : 0;
+	flgs |= (flags & ODP_SHM_LOCK) ? _ODP_ISHM_LOCK : 0;
 
 	block_index = _odp_ishm_reserve(name, size, -1, align, flgs, flags);
 	if (block_index >= 0)