Public Member Functions | Static Public Member Functions

nsAutoMonitor Class Reference

#include <nsAutoLock.h>

Inheritance diagram for nsAutoMonitor:
Collaboration diagram for nsAutoMonitor:

List of all members.

Public Member Functions

 nsAutoMonitor (PRMonitor *mon)
 Constructor The constructor locks the given monitor.
 ~nsAutoMonitor ()
void Enter ()
 Enter Client may call this to reenter the given monitor.
void Exit ()
 Exit Client may call this to exit the given monitor.
nsresult Wait (PRIntervalTime interval=0xffffffffUL)
 Wait.
nsresult Notify ()
 Notify.
nsresult NotifyAll ()
 NotifyAll.

Static Public Member Functions

static PRMonitorNewMonitor (const char *name)
 NewMonitor Allocates a new PRMonitor for use with nsAutoMonitor.
static void DestroyMonitor (PRMonitor *mon)

Constructor & Destructor Documentation

nsAutoMonitor::nsAutoMonitor ( PRMonitor mon  )  [inline]

Constructor The constructor locks the given monitor.

During destruction the monitor will be unlocked.

Parameters:
mon A valid PRMonitor* returned from nsAutoMonitor::NewMonitor().
nsAutoMonitor::~nsAutoMonitor (  )  [inline]

Member Function Documentation

static void nsAutoMonitor::DestroyMonitor ( PRMonitor mon  )  [static]
void nsAutoMonitor::Enter (  ) 

Enter Client may call this to reenter the given monitor.

See also:
prmon.h
void nsAutoMonitor::Exit (  ) 

Exit Client may call this to exit the given monitor.

See also:
prmon.h
static PRMonitor* nsAutoMonitor::NewMonitor ( const char *  name  )  [static]

NewMonitor Allocates a new PRMonitor for use with nsAutoMonitor.

Parameters:
name A (unique /be?) name which can reference this monitor
Returns:
nsnull if failure A valid PRMonitor* is successful while must be destroyed by nsAutoMonitor::DestroyMonitor()
nsresult nsAutoMonitor::Notify (  )  [inline]

Notify.

See also:
prmon.h
nsresult nsAutoMonitor::NotifyAll (  )  [inline]

NotifyAll.

See also:
prmon.h
nsresult nsAutoMonitor::Wait ( PRIntervalTime  interval = 0xffffffffUL  )  [inline]

Wait.

See also:
prmon.h

The documentation for this class was generated from the following file: