IPC::Mmap::POSIX

SUMMARY: CONSTR | METHOD | DETAIL: CONSTR | METHOD

## Class IPC::Mmap::POSIX

Inherits from:
  IPC::Mmap

Concrete implementation of the IPC::Mmap class for OS's supporting a POSIX mmap().

Permission is granted to use this software under the same terms as Perl itself. Refer to the Perl Artistic License for details.

Author:
  D. Arnold
Version:
  0.11
Since:
  2006-05-01

Unless otherwise noted, `$self` is the object instance variable.

Constructor Summary
`new($filename, $length, $protflags, $mmapflags)` mmap()'s using POSIX mmap()

Method Summary
`close()` Unmap the mmap()ed region
`lock()` Locks the mmap'ed region
`unlock()` Unlocks the mmap'ed region

Constructor Details

### new

    new($filename, $length, $protflags, $mmapflags)

  mmap()'s using POSIX mmap().

  Parameters:
    `$filename` -
    `$length` - optional
    `$protflags` - optional
    `$mmapflags` - optional
  Returns:
    the IPC::Mmap::POSIX object on success; undef on failure

Method Details

### close

    close()

  Unmap the mmap()ed region.

### lock

    lock()

  Locks the mmap'ed region. Implemented using flock() on the mmap()'ed file.

  NOTE: This lock is not sufficient for multithreaded access control, but may be sufficient for multiprocess access control.

  Also note that, due to flock() restrictions on some platforms, the type of lock is determined by the protection flags with which the mmap'ed region was created: if only PROT_READ, then shared access is used; otherwise, an exclusive lock is used.

### unlock

    unlock()

  Unlocks the mmap'ed region. Implemented using flock() on the mmap()'ed file.

Generated by psichedoc on Wed May 3 07:40:42 2006