Verified Commit a0581db1 authored by jD91mZM2's avatar jD91mZM2

Merge ProtFlags and MapFlags

parent c0dad447
use core::ops::{Deref, DerefMut};
use core::{mem, slice};
use crate::flag::{EventFlags, ProtFlags, PtraceFlags, SigActionFlags};
use crate::flag::{EventFlags, MapFlags, PtraceFlags, SigActionFlags};
#[derive(Copy, Clone, Debug, Default)]
#[repr(C)]
......@@ -58,7 +58,7 @@ impl DerefMut for ITimerSpec {
pub struct Map {
pub offset: usize,
pub size: usize,
pub flags: ProtFlags,
pub flags: MapFlags,
}
impl Deref for Map {
......
......@@ -66,6 +66,11 @@ pub const FUTEX_REQUEUE: usize = 2;
bitflags! {
pub struct MapFlags: usize {
const PROT_NONE = 0x0000_0000;
const PROT_EXEC = 0x0001_0000;
const PROT_WRITE = 0x0002_0000;
const PROT_READ = 0x0004_0000;
const MAP_SHARED = 0x0001;
const MAP_PRIVATE = 0x0002;
}
......@@ -128,15 +133,6 @@ bitflags! {
}
}
bitflags! {
pub struct ProtFlags: usize {
const PROT_NONE = 0x0000_0000;
const PROT_EXEC = 0x0001_0000;
const PROT_WRITE = 0x0002_0000;
const PROT_READ = 0x0004_0000;
}
}
pub const SEEK_SET: usize = 0;
pub const SEEK_CUR: usize = 1;
pub const SEEK_END: usize = 2;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment