Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add mempolicy.h definition #96

Merged
merged 1 commit into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions gen/modules/general.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include <linux/inotify.h>
#include <linux/limits.h>
#include <linux/magic.h>
#include <linux/mempolicy.h>
#include <linux/mman.h>
#include <linux/poll.h>
#include <linux/random.h>
Expand Down
38 changes: 38 additions & 0 deletions src/aarch64/general.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1473,6 +1473,25 @@ pub const UDF_SUPER_MAGIC: u32 = 352400198;
pub const DMA_BUF_MAGIC: u32 = 1145913666;
pub const DEVMEM_MAGIC: u32 = 1162691661;
pub const SECRETMEM_MAGIC: u32 = 1397048141;
pub const MPOL_F_STATIC_NODES: u32 = 32768;
pub const MPOL_F_RELATIVE_NODES: u32 = 16384;
pub const MPOL_F_NUMA_BALANCING: u32 = 8192;
pub const MPOL_MODE_FLAGS: u32 = 57344;
pub const MPOL_F_NODE: u32 = 1;
pub const MPOL_F_ADDR: u32 = 2;
pub const MPOL_F_MEMS_ALLOWED: u32 = 4;
pub const MPOL_MF_STRICT: u32 = 1;
pub const MPOL_MF_MOVE: u32 = 2;
pub const MPOL_MF_MOVE_ALL: u32 = 4;
pub const MPOL_MF_LAZY: u32 = 8;
pub const MPOL_MF_INTERNAL: u32 = 16;
pub const MPOL_MF_VALID: u32 = 7;
pub const MPOL_F_SHARED: u32 = 1;
pub const MPOL_F_MOF: u32 = 8;
pub const MPOL_F_MORON: u32 = 16;
pub const RECLAIM_ZONE: u32 = 1;
pub const RECLAIM_WRITE: u32 = 2;
pub const RECLAIM_UNMAP: u32 = 4;
pub const PROT_READ: u32 = 1;
pub const PROT_WRITE: u32 = 2;
pub const PROT_EXEC: u32 = 4;
Expand Down Expand Up @@ -2548,6 +2567,13 @@ pub const SPLICE_F_MOVE: u32 = 1;
pub const SPLICE_F_NONBLOCK: u32 = 2;
pub const SPLICE_F_MORE: u32 = 4;
pub const SPLICE_F_GIFT: u32 = 8;
pub const MPOL_DEFAULT: _bindgen_ty_1 = _bindgen_ty_1::MPOL_DEFAULT;
pub const MPOL_PREFERRED: _bindgen_ty_1 = _bindgen_ty_1::MPOL_PREFERRED;
pub const MPOL_BIND: _bindgen_ty_1 = _bindgen_ty_1::MPOL_BIND;
pub const MPOL_INTERLEAVE: _bindgen_ty_1 = _bindgen_ty_1::MPOL_INTERLEAVE;
pub const MPOL_LOCAL: _bindgen_ty_1 = _bindgen_ty_1::MPOL_LOCAL;
pub const MPOL_PREFERRED_MANY: _bindgen_ty_1 = _bindgen_ty_1::MPOL_PREFERRED_MANY;
pub const MPOL_MAX: _bindgen_ty_1 = _bindgen_ty_1::MPOL_MAX;
#[repr(u32)]
#[non_exhaustive]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
Expand All @@ -2564,6 +2590,18 @@ FSCONFIG_CMD_RECONFIGURE = 7,
#[repr(u32)]
#[non_exhaustive]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum _bindgen_ty_1 {
MPOL_DEFAULT = 0,
MPOL_PREFERRED = 1,
MPOL_BIND = 2,
MPOL_INTERLEAVE = 3,
MPOL_LOCAL = 4,
MPOL_PREFERRED_MANY = 5,
MPOL_MAX = 6,
}
#[repr(u32)]
#[non_exhaustive]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum membarrier_cmd {
MEMBARRIER_CMD_QUERY = 0,
MEMBARRIER_CMD_GLOBAL = 1,
Expand Down
38 changes: 38 additions & 0 deletions src/arm/general.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1504,6 +1504,25 @@ pub const UDF_SUPER_MAGIC: u32 = 352400198;
pub const DMA_BUF_MAGIC: u32 = 1145913666;
pub const DEVMEM_MAGIC: u32 = 1162691661;
pub const SECRETMEM_MAGIC: u32 = 1397048141;
pub const MPOL_F_STATIC_NODES: u32 = 32768;
pub const MPOL_F_RELATIVE_NODES: u32 = 16384;
pub const MPOL_F_NUMA_BALANCING: u32 = 8192;
pub const MPOL_MODE_FLAGS: u32 = 57344;
pub const MPOL_F_NODE: u32 = 1;
pub const MPOL_F_ADDR: u32 = 2;
pub const MPOL_F_MEMS_ALLOWED: u32 = 4;
pub const MPOL_MF_STRICT: u32 = 1;
pub const MPOL_MF_MOVE: u32 = 2;
pub const MPOL_MF_MOVE_ALL: u32 = 4;
pub const MPOL_MF_LAZY: u32 = 8;
pub const MPOL_MF_INTERNAL: u32 = 16;
pub const MPOL_MF_VALID: u32 = 7;
pub const MPOL_F_SHARED: u32 = 1;
pub const MPOL_F_MOF: u32 = 8;
pub const MPOL_F_MORON: u32 = 16;
pub const RECLAIM_ZONE: u32 = 1;
pub const RECLAIM_WRITE: u32 = 2;
pub const RECLAIM_UNMAP: u32 = 4;
pub const PROT_READ: u32 = 1;
pub const PROT_WRITE: u32 = 2;
pub const PROT_EXEC: u32 = 4;
Expand Down Expand Up @@ -2672,6 +2691,13 @@ pub const SPLICE_F_NONBLOCK: u32 = 2;
pub const SPLICE_F_MORE: u32 = 4;
pub const SPLICE_F_GIFT: u32 = 8;
pub const _NSIG: u32 = 64;
pub const MPOL_DEFAULT: _bindgen_ty_1 = _bindgen_ty_1::MPOL_DEFAULT;
pub const MPOL_PREFERRED: _bindgen_ty_1 = _bindgen_ty_1::MPOL_PREFERRED;
pub const MPOL_BIND: _bindgen_ty_1 = _bindgen_ty_1::MPOL_BIND;
pub const MPOL_INTERLEAVE: _bindgen_ty_1 = _bindgen_ty_1::MPOL_INTERLEAVE;
pub const MPOL_LOCAL: _bindgen_ty_1 = _bindgen_ty_1::MPOL_LOCAL;
pub const MPOL_PREFERRED_MANY: _bindgen_ty_1 = _bindgen_ty_1::MPOL_PREFERRED_MANY;
pub const MPOL_MAX: _bindgen_ty_1 = _bindgen_ty_1::MPOL_MAX;
#[repr(u32)]
#[non_exhaustive]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
Expand All @@ -2688,6 +2714,18 @@ FSCONFIG_CMD_RECONFIGURE = 7,
#[repr(u32)]
#[non_exhaustive]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum _bindgen_ty_1 {
MPOL_DEFAULT = 0,
MPOL_PREFERRED = 1,
MPOL_BIND = 2,
MPOL_INTERLEAVE = 3,
MPOL_LOCAL = 4,
MPOL_PREFERRED_MANY = 5,
MPOL_MAX = 6,
}
#[repr(u32)]
#[non_exhaustive]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum membarrier_cmd {
MEMBARRIER_CMD_QUERY = 0,
MEMBARRIER_CMD_GLOBAL = 1,
Expand Down
38 changes: 38 additions & 0 deletions src/csky/general.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1495,6 +1495,25 @@ pub const UDF_SUPER_MAGIC: u32 = 352400198;
pub const DMA_BUF_MAGIC: u32 = 1145913666;
pub const DEVMEM_MAGIC: u32 = 1162691661;
pub const SECRETMEM_MAGIC: u32 = 1397048141;
pub const MPOL_F_STATIC_NODES: u32 = 32768;
pub const MPOL_F_RELATIVE_NODES: u32 = 16384;
pub const MPOL_F_NUMA_BALANCING: u32 = 8192;
pub const MPOL_MODE_FLAGS: u32 = 57344;
pub const MPOL_F_NODE: u32 = 1;
pub const MPOL_F_ADDR: u32 = 2;
pub const MPOL_F_MEMS_ALLOWED: u32 = 4;
pub const MPOL_MF_STRICT: u32 = 1;
pub const MPOL_MF_MOVE: u32 = 2;
pub const MPOL_MF_MOVE_ALL: u32 = 4;
pub const MPOL_MF_LAZY: u32 = 8;
pub const MPOL_MF_INTERNAL: u32 = 16;
pub const MPOL_MF_VALID: u32 = 7;
pub const MPOL_F_SHARED: u32 = 1;
pub const MPOL_F_MOF: u32 = 8;
pub const MPOL_F_MORON: u32 = 16;
pub const RECLAIM_ZONE: u32 = 1;
pub const RECLAIM_WRITE: u32 = 2;
pub const RECLAIM_UNMAP: u32 = 4;
pub const PROT_READ: u32 = 1;
pub const PROT_WRITE: u32 = 2;
pub const PROT_EXEC: u32 = 4;
Expand Down Expand Up @@ -2585,6 +2604,13 @@ pub const SPLICE_F_MOVE: u32 = 1;
pub const SPLICE_F_NONBLOCK: u32 = 2;
pub const SPLICE_F_MORE: u32 = 4;
pub const SPLICE_F_GIFT: u32 = 8;
pub const MPOL_DEFAULT: _bindgen_ty_1 = _bindgen_ty_1::MPOL_DEFAULT;
pub const MPOL_PREFERRED: _bindgen_ty_1 = _bindgen_ty_1::MPOL_PREFERRED;
pub const MPOL_BIND: _bindgen_ty_1 = _bindgen_ty_1::MPOL_BIND;
pub const MPOL_INTERLEAVE: _bindgen_ty_1 = _bindgen_ty_1::MPOL_INTERLEAVE;
pub const MPOL_LOCAL: _bindgen_ty_1 = _bindgen_ty_1::MPOL_LOCAL;
pub const MPOL_PREFERRED_MANY: _bindgen_ty_1 = _bindgen_ty_1::MPOL_PREFERRED_MANY;
pub const MPOL_MAX: _bindgen_ty_1 = _bindgen_ty_1::MPOL_MAX;
#[repr(u32)]
#[non_exhaustive]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
Expand All @@ -2601,6 +2627,18 @@ FSCONFIG_CMD_RECONFIGURE = 7,
#[repr(u32)]
#[non_exhaustive]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum _bindgen_ty_1 {
MPOL_DEFAULT = 0,
MPOL_PREFERRED = 1,
MPOL_BIND = 2,
MPOL_INTERLEAVE = 3,
MPOL_LOCAL = 4,
MPOL_PREFERRED_MANY = 5,
MPOL_MAX = 6,
}
#[repr(u32)]
#[non_exhaustive]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum membarrier_cmd {
MEMBARRIER_CMD_QUERY = 0,
MEMBARRIER_CMD_GLOBAL = 1,
Expand Down
38 changes: 38 additions & 0 deletions src/loongarch64/general.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1471,6 +1471,25 @@ pub const UDF_SUPER_MAGIC: u32 = 352400198;
pub const DMA_BUF_MAGIC: u32 = 1145913666;
pub const DEVMEM_MAGIC: u32 = 1162691661;
pub const SECRETMEM_MAGIC: u32 = 1397048141;
pub const MPOL_F_STATIC_NODES: u32 = 32768;
pub const MPOL_F_RELATIVE_NODES: u32 = 16384;
pub const MPOL_F_NUMA_BALANCING: u32 = 8192;
pub const MPOL_MODE_FLAGS: u32 = 57344;
pub const MPOL_F_NODE: u32 = 1;
pub const MPOL_F_ADDR: u32 = 2;
pub const MPOL_F_MEMS_ALLOWED: u32 = 4;
pub const MPOL_MF_STRICT: u32 = 1;
pub const MPOL_MF_MOVE: u32 = 2;
pub const MPOL_MF_MOVE_ALL: u32 = 4;
pub const MPOL_MF_LAZY: u32 = 8;
pub const MPOL_MF_INTERNAL: u32 = 16;
pub const MPOL_MF_VALID: u32 = 7;
pub const MPOL_F_SHARED: u32 = 1;
pub const MPOL_F_MOF: u32 = 8;
pub const MPOL_F_MORON: u32 = 16;
pub const RECLAIM_ZONE: u32 = 1;
pub const RECLAIM_WRITE: u32 = 2;
pub const RECLAIM_UNMAP: u32 = 4;
pub const PROT_READ: u32 = 1;
pub const PROT_WRITE: u32 = 2;
pub const PROT_EXEC: u32 = 4;
Expand Down Expand Up @@ -2533,6 +2552,13 @@ pub const SPLICE_F_MOVE: u32 = 1;
pub const SPLICE_F_NONBLOCK: u32 = 2;
pub const SPLICE_F_MORE: u32 = 4;
pub const SPLICE_F_GIFT: u32 = 8;
pub const MPOL_DEFAULT: _bindgen_ty_1 = _bindgen_ty_1::MPOL_DEFAULT;
pub const MPOL_PREFERRED: _bindgen_ty_1 = _bindgen_ty_1::MPOL_PREFERRED;
pub const MPOL_BIND: _bindgen_ty_1 = _bindgen_ty_1::MPOL_BIND;
pub const MPOL_INTERLEAVE: _bindgen_ty_1 = _bindgen_ty_1::MPOL_INTERLEAVE;
pub const MPOL_LOCAL: _bindgen_ty_1 = _bindgen_ty_1::MPOL_LOCAL;
pub const MPOL_PREFERRED_MANY: _bindgen_ty_1 = _bindgen_ty_1::MPOL_PREFERRED_MANY;
pub const MPOL_MAX: _bindgen_ty_1 = _bindgen_ty_1::MPOL_MAX;
#[repr(u32)]
#[non_exhaustive]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
Expand All @@ -2549,6 +2575,18 @@ FSCONFIG_CMD_RECONFIGURE = 7,
#[repr(u32)]
#[non_exhaustive]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum _bindgen_ty_1 {
MPOL_DEFAULT = 0,
MPOL_PREFERRED = 1,
MPOL_BIND = 2,
MPOL_INTERLEAVE = 3,
MPOL_LOCAL = 4,
MPOL_PREFERRED_MANY = 5,
MPOL_MAX = 6,
}
#[repr(u32)]
#[non_exhaustive]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum membarrier_cmd {
MEMBARRIER_CMD_QUERY = 0,
MEMBARRIER_CMD_GLOBAL = 1,
Expand Down
Loading
Loading