PM Library classes

class PMMutex

? ^ 
    extends PMNonCopyable as public

Serialize access to resources.

A mutual exclusion class PMMutex protects resources (such as files, data in memory, and peripheral devices) from simultaneous access by several processes. Class also enable threads to serialize their access to resources.

None of the functions in this class throws exceptions because an exception probably has been thrown already or is about to be thrown.

You can construct and destruct objects of this class.

Source:
pm_mutex.h:32
Author:
Dmitry A.Steklenev
Version:
$Revision: 1.2 $

Contents

^ 
EntityInherited FromTypeScopeShort Description
PMMutexconstructor publicConstructs the mutual exclusion object.
~PMMutexdestructor publicDestructs the mutual exclusion object.
requestmethod public Request access to resource.
requestmethod public Request access to resource with wait timeout.
releasemethod public Relinquishes ownership of a resource that was requested by request.

constructor PMMutex

? ^  > 
Constructs the mutual exclusion object.
Source:
pm_mutex.h:35
Code:
public PMMutex ( )

destructor ~PMMutex

? ^  < > 
Destructs the mutual exclusion object.
Source:
pm_mutex.h:37
Code:
public ~ PMMutex ( )

method request

? ^  < > 
Request access to resource.

Requests ownership of a resource. Blocks the calling thread indefinitely.

Source:
pm_mutex.h:48
Returns:
TRUE, if ownership established.
Code:
public BOOL request ( )

method request

? ^  < > 
Request access to resource with wait timeout.

Requests ownership of a resource. Blocks the calling thread.

Source:
pm_mutex.h:62
Param:
mseq this is the maximum amount of time the user wants to allow the thread to be blocked.

Returns:
TRUE, if ownership established.
Code:
public BOOL request ( unsigned long msec )

method release

? ^  < > 
Relinquishes ownership of a resource that was requested by request.

Only the thread that owns the resource can issue release().

Source:
pm_mutex.h:73
Returns:
TRUE, if ownership relinquished.
Code:
public BOOL release ( )

Created Fri Aug 3 09:13:16 2012.
This documentation was generated automatically by
ccdoc v08r39 2003/02/27 bin_opt_emx_os2-2.30.
Click here to submit a bug report or feature request for ccdoc.
Click here to return to the top of the page.