diff mbox

[API-NEXT,07/14] linux-gen: shm: new ODP_SHM_LOCK flag implementation

Message ID 1475836517-60484-8-git-send-email-christophe.milard@linaro.org
State Superseded
Headers show

Commit Message

Christophe Milard Oct. 7, 2016, 10:35 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)