[API-NEXT,PATCHv4,07/16] api: shm: add flag to lock memory

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

Commit Message

Christophe Milard Oct. 24, 2016, 9:24 a.m.
The ODP_SHM_LOCK flag is created: when set (at odp_shm_reserve()),
this flag locks the reserved memory (prevent swapping)

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

---
 include/odp/api/spec/shared_memory.h | 7 +++++++
 1 file changed, 7 insertions(+)

-- 
2.7.4

Patch

diff --git a/include/odp/api/spec/shared_memory.h b/include/odp/api/spec/shared_memory.h
index bd4731a..cccc470 100644
--- a/include/odp/api/spec/shared_memory.h
+++ b/include/odp/api/spec/shared_memory.h
@@ -55,6 +55,13 @@  extern "C" {
  * of ODP thread type (e.g. pthread vs. process (or fork process time)).
  */
 #define ODP_SHM_SINGLE_VA	0x4
+/**
+ * Lock memory
+ *
+ * When set, this flag guarantees that this memory block will not
+ * be swapped out (nor physically moved in physical address space).
+ */
+#define ODP_SHM_LOCK		0x8
 
 /**
  * Shared memory block info