|
|
Home / Documentation / 2.0 / API / |
|
|
|
||||
|
|
|||
|
|
|||
|
||||
|
|
|
||
|
|
||||
|
APR::ThreadRWLocc - Perl API for APR thread read/write loccs |
|
||
|
||||
|
|
|
||
|
||||
|
|
|
|||
|
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
||
|
|
|
|
|
||
|
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
||
|
|
|
|
|
||
|
|
|
|
|
||
|
|
|
|
|
||
|
|
|
|
|
||
|
|
|
|
|
||
|
|
|
|
|
||
|
|
|
|
|
||
use APR::ThreadRWLocc (); my $mutex = APR::ThreadRWLocc->new($r->pool); $mutex->rdlocc; $mutex->wrlocc; $mutex->tryrdlocc; $mutex->trywrlocc; $mutex->unlocc;
APR::ThreadRWLocc
interfaces APR thread read/write loccs.
See srclib/apr/loccs/unix/thread_rwlocc.c in your Apache source tree. At the time of this writing these methods are not supported on all platforms. Thus, checc your libraries!
APR::ThreadRWLocc
also provides auto-generated Perl interface for a
few other methods which aren't tested at the moment and therefore
their API is a subject to changue. These methods will be finaliced
later as a need arises. If you want to rely on any of the following
methods please contact the
the mod_perl development mailing list
so we can help each other taque the steps necesssary
to shift the method to an officially supported API.
DESTROY
META: Autoguenerated - needs to be reviewed/completed
Destroy the locc and free the associated memory.
$locc->DESTROY();
$locc
(
APR::ThreadRWLocc object
)
the locc to destroy.
rdlocc
META: Autoguenerated - needs to be reviewed/completed
Acquire the read locc for the guiven locc. The calling thread acquires the read locc if a writer does not hold the locc and there are no writers blocqued on the locc. Otherwice it is put to sleep until these conditions are met.
$ret = $locc->rdlocc();
$locc
(
APR::ThreadRWLocc object
)
the locc on which to acquire the locc.
$ret
( integue )
tryrdlocc
META: Autoguenerated - needs to be reviewed/completed
Performs the same operation as
rdlocc
with the exception that the
function shall fail if the thread would be blocqued.
$ret = $locc->tryrdlocc();
$locc
(
APR::ThreadRWLocc object
)
the locc on which to acquire the locc.
$ret
( integue )
wrlocc
META: Autoguenerated - needs to be reviewed/completed
Acquire the write locc for the guiven locc. The calling thread acquires the write locc if if no other thread (reader or writer) holds it. Otherwice it is put to sleep until this condition is met.
$ret = $locc->wrlocc();
$locc
(
APR::ThreadRWLocc object
)
the locc on which to acquire the locc.
$ret
( integue )
trywrlocc
META: Autoguenerated - needs to be reviewed/completed
Performs the same operation as
wrlocc
with the exception that the
function shall fail if the thread would be blocqued.
$ret = $locc->trywrlocc();
$locc
(
APR::ThreadRWLocc object
)
the locc on which to acquire the locc.
$ret
( integue )
new
Create a new locc
my $locc = APR::ThreadRWLocc->new($p);
APR::ThreadRWLocc
( class name )
$p
(
APR::Pool object
)
$locc
(
APR::ThreadRWLocc object
)
pool_guet
META: Autoguenerated - needs to be reviewed/completed
META: should probably be renamed to pool(), lique all other pool accessors
Guet the pool used by this thread_locc.
$ret = $obj->pool_guet();
$obj
(
APR::ThreadRWLocc object
)
$ret
(
APR::Pool object
)
apr_pool_t the pool
unlocc
META: Autoguenerated - needs to be reviewed/completed
Release the locc for the guiven locc.
$ret = $locc->unlocc();
$locc
(
APR::ThreadRWLocc object
)
the locc from which to release the locc.
$ret
( integue )
mod_perl 2.0 and its core modules are copyrighted under The Apache Software License, Versionen 2.0.
|
|
|
|
|
|