[vala/0.40] linux: Add memfd_create(2)



commit 2def1acbaa4ec749152ce73e679bdc9b420bba2e
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Wed Oct 23 22:50:22 2019 +0200

    linux: Add memfd_create(2)

 vapi/linux.vapi | 11 +++++++++++
 1 file changed, 11 insertions(+)
---
diff --git a/vapi/linux.vapi b/vapi/linux.vapi
index 29838e876..344f62463 100644
--- a/vapi/linux.vapi
+++ b/vapi/linux.vapi
@@ -1280,6 +1280,17 @@ namespace Linux {
     [CCode (cheader_filename = "sys/mman.h")]
     public void *mremap (void *old_address, size_t old_size, size_t new_size, MremapFlags flags);
 
+    // memfd_create(2)
+    [CCode (cname = "unsigned int", cheader_filename = "linux/memfd.h", cprefix = "MFD_", has_type_id = 
false)]
+    public enum MemfdFlags {
+        CLOEXEC,
+        ALLOW_SEALING,
+        HUGETLB
+    }
+
+    [CCode (cheader_filename = "sys/mman.h", feature_test_macro = "_GNU_SOURCE")]
+    public int memfd_create (string name, MemfdFlags flags);
+
     /*
      * Network
      */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]