shm::shmat! [] [src]

macro_rules! shmat {
    ($id: expr) => ({
        extern crate std;
        shmat!($id, std::ptr::null_mut(), 0)
    });
    ($id: expr, $addr: expr) => ({
        shmat!($id, $addr, 0)
    });
    ($id: expr, $addr: expr, $flag: expr) => ({
        extern crate shm;
        match unsafe {
            shm::ffi::shmat (
                $id as i32,
                $addr,
                $flag as i32,
            )
        } {
            addr if addr.is_null() => None,
            addr => Some(addr),
        }
    });
}

The shmat macro returns the fist memory address.