Name

IPC::SRLock::Sysv - Set/reset locks using semop and shmop

Version

0.1.$Revision: 52 $

Synopsis

use IPC::SRLock;

my $config   = { tempdir => q(path_to_tmp_directory), type => q(sysv) };

my $lock_obj = IPC::SRLock->new( $config );

Description

Uses System V semaphores to lock access to a shared memory file

Configuration and Environment

This class defines accessors and mutators for these attributes:

lockfile

The key the the semaphore. Defaults to 195_911_405

mode

Mode to create the shared memory file. Defaults to 0666

num_locks

Maximum number of simultaneous locks. Defaults to 100

shmfile

The key to the shared memory file. Defaults to 195_911_405

size

Maximum size of a lock record. Limits the lock key to 255 bytes. Defaults to 300

Subroutines/Methods

_init

Initialise the object

_get_semid

Return the semaphore reference

_get_shmid

Return the shared memory reference

_list

List the contents of the lock table

_reset

Delete a lock from the lock table

_set

Set a lock in the lock table

Diagnostics

None

Dependencies

IPC::SRLock
IPC::SysV
Readonly

Incompatibilities

There are no known incompatibilities in this module

Bugs and Limitations

There are no known bugs in this module. Please report problems to the address below. Patches are welcome

Author

Peter Flanigan, <Support at RoxSoft.co.uk>

License and Copyright

Copyright (c) 2008 Peter Flanigan. All rights reserved

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic

This program is distributed in the hope that it will be useful, but WITHOUT WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE