Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

monitors.h File Reference

#include "global.h"

Include dependency graph for monitors.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Functions

void InitializeMonitors ()
 Initialize monitors. More...

void ShutdownMonitors ()
 Shut them down. More...

void Lock (const JVMPI_RawMonitor &monitor)
 Locks a raw monitor. More...

void Unlock (const JVMPI_RawMonitor &monitor)
 Unlocks a raw monitor. More...


Variables

JVMPI_RawMonitor output_lock
 Used for output locking since cout isn't thread-safe. More...

JVMPI_RawMonitor methods_lock
 Used for Methods . More...

JVMPI_RawMonitor threads_lock
 Used for Threads . More...


Function Documentation

void InitializeMonitors ( )
 

Initialize monitors.

Definition at line 52 of file monitors.cpp.

00053 {
00054     output_lock     = CALL(RawMonitorCreate)("_output_lock");
00055     methods_lock    = CALL(RawMonitorCreate)("_methods_lock");
00056     threads_lock    = CALL(RawMonitorCreate)("_threads_lock");
00057 }

void Lock ( const JVMPI_RawMonitor & monitor ) [inline]
 

Locks a raw monitor.

Parameters:
monitor   the already-initialized monitor to lock.

Definition at line 56 of file monitors.h.

Referenced by ClassUnloadEvent(), Debug(), NotifyEvent(), ThreadDump(), ThreadEndHandler(), and ThreadStartHandler().

00057 {
00058     CALL(RawMonitorEnter)(monitor);
00059 }

void ShutdownMonitors ( )
 

Shut them down.

Definition at line 62 of file monitors.cpp.

00063 {
00064     /*
00065     CALL(RawMonitorDestroy)(output_lock);
00066     CALL(RawMonitorDestroy)(data_lock);
00067     CALL(RawMonitorDestroy)(methods_lock);
00068     CALL(RawMonitorDestroy)(threads_lock);
00069     */
00070     unsafe_debug("Destroyed!", "");
00071 }

void Unlock ( const JVMPI_RawMonitor & monitor ) [inline]
 

Unlocks a raw monitor.

Parameters:
monitor   the locked monitor.

Definition at line 65 of file monitors.h.

Referenced by ClassUnloadEvent(), Debug(), NotifyEvent(), ThreadDump(), ThreadEndHandler(), and ThreadStartHandler().

00066 {
00067     CALL(RawMonitorExit)(monitor);
00068 }


Variable Documentation

JVMPI_RawMonitor methods_lock
 

Used for Methods .

Definition at line 43 of file monitors.h.

JVMPI_RawMonitor output_lock
 

Used for output locking since cout isn't thread-safe.

Definition at line 42 of file monitors.h.

JVMPI_RawMonitor threads_lock
 

Used for Threads .

Definition at line 44 of file monitors.h.


Generated at Sun Jun 24 20:57:52 2001 for xdprof by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001