| Safe Haskell | Safe-Inferred |
|---|
System.Posix.SharedBuffer
Contents
- openSBuffer :: String -> CInt -> ShmOpenFlags -> [Protection] -> FileMode -> IO SharedBuffer
- closeSharedBuffer :: SharedBuffer -> IO ()
- removeSharedBuffer :: SharedBuffer -> IO ()
- unlinkSharedBuffer :: SharedBuffer -> IO ()
- data SharedBuffer = SharedBuffer {}
- data Flags
- = MapShared
- | MapPrivate
- data Protection
- getProtection :: [Protection] -> CInt
- writeProtection :: [Protection]
- data ShmOpenFlags = ShmOpenFlags {
- shmReadWrite :: Bool
- shmCreate :: Bool
- shmExclusive :: Bool
- shmTrunc :: Bool
- openReadWriteFlags :: ShmOpenFlags
- openReadFlags :: ShmOpenFlags
Main shared memory interface
openSBuffer :: String -> CInt -> ShmOpenFlags -> [Protection] -> FileMode -> IO SharedBufferSource
Open a shared memory object, then mmap it, with the specified flags.
closeSharedBuffer :: SharedBuffer -> IO ()Source
Close a reference to a shared memory object. Just calls munmap.
removeSharedBuffer :: SharedBuffer -> IO ()Source
Close a reference to a shared memory object and removes it.
Calls munmap followed by shm_unlink
unlinkSharedBuffer :: SharedBuffer -> IO ()Source
Unlink a shared buffer (shm_unlink) without closing the reference to it. Any processes that have already opened the buffer (including this one) should be able to continue accessing it.
After unlinkSharedBuffer, references should be closed with
closeSharedBuffer.
private stuff (exported for wizards)
generalized buffer access
getProtection :: [Protection] -> CIntSource
re-exports
data ShmOpenFlags
Constructors
| ShmOpenFlags | |
Fields
| |