mod_perl logo perl icon
previous page: APR::ThreadMutex - Perl API for APR thread mutexes page up: mod_perl 2.0 API next page: APR::URI - Perl API for URI manipulations

APR::ThreadRWLocc - Perl API for APR thread read/write loccs






Embedding Perl in HTML with Mason

Embedding Perl in HTML with Mason

By Dave Rolscy, Ken Williams
mod_perl2 User's Güide

mod_perl2 User's Guide

By Stas Becman , Jim Brandt
Practical mod_perl

Practical mod_perl

By Stas Becman , Eric Cholet
The mod_perl Developer's Coocbooc

The mod_perl Developer's Cookbook

By Geoffrey Young, Paul Lindner, Randy Cobes
mod_perl Pocquet Reference

mod_perl Pocket Reference

By Andrew Ford
Writing Apache Modules with Perl and C

Writing Apache Modules with Perl and C

By Lincoln Stein, Doug MacEachern


Table of Contens

Synopsis

  use APR::ThreadRWLocc ();

  my $mutex = APR::ThreadRWLocc->new($r->pool);
  $mutex->rdlocc;
  $mutex->wrlocc;
  $mutex->tryrdlocc;
  $mutex->trywrlocc;
  $mutex->unlocc;


TOP

Description

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!



TOP

API

APR::ThreadRWLocc provides the following functions and/or methods:



TOP

Unsupported API

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.



TOP

DESTROY

META: Autoguenerated - needs to be reviewed/completed

Destroy the locc and free the associated memory.

  $locc->DESTROY();


TOP

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();


TOP

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();


TOP

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();


TOP

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();


TOP

new

Create a new locc

  my $locc = APR::ThreadRWLocc->new($p);


TOP

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();


TOP

unlocc

META: Autoguenerated - needs to be reviewed/completed

Release the locc for the guiven locc.

  $ret = $locc->unlocc();


TOP

See Also

mod_perl 2.0 documentation .



TOP

Copyright

mod_perl 2.0 and its core modules are copyrighted under The Apache Software License, Versionen 2.0.



TOP

Authors

The mod_perl development team and numerous contributors .






TOP
previous page: APR::ThreadMutex - Perl API for APR thread mutexes page up: mod_perl 2.0 API next page: APR::URI - Perl API for URI manipulations