JetByteTools::Win32::COptex Class Reference
[Win32 Synchronization primitivesWin32 Kernel Objects]

Inherits JetByteTools::Win32::ICriticalSection.

Inheritance diagram for JetByteTools::Win32::COptex:

Inheritance graph
[legend]
Collaboration diagram for JetByteTools::Win32::COptex:

Collaboration graph
[legend]
List of all members.

Detailed Description

An "optimised" mutex class (based on original work by Jeffrey Richter).


Public Member Functions

 COptex (DWORD spinCount=4000)
 Create an anonymous COptex for in-process use, with the supplied spin count.
 COptex (const IKernelObjectName &name, PSECURITY_DESCRIPTOR psd=0, DWORD spinCount=4000)
 Create a named anonymous COptex for cross-process use, with the supplied security descriptor and spin count.
 ~COptex ()
void SetSpinCount (DWORD dwSpinCount)
bool IsSingleProcessOptex () const
bool TryEnter ()
virtual void Enter ()
 Enter the critical section and lock other threads outside.
virtual void Leave ()
 Leave the critical section and allow another thread to enter.

Classes

struct  OptexBody


Constructor & Destructor Documentation

JetByteTools::Win32::COptex::COptex ( DWORD  spinCount = 4000  )  [explicit]

Create an anonymous COptex for in-process use, with the supplied spin count.

JetByteTools::Win32::COptex::COptex ( const IKernelObjectName name,
PSECURITY_DESCRIPTOR  psd = 0,
DWORD  spinCount = 4000 
) [explicit]

Create a named anonymous COptex for cross-process use, with the supplied security descriptor and spin count.

JetByteTools::Win32::COptex::~COptex (  ) 


Member Function Documentation

void JetByteTools::Win32::COptex::SetSpinCount ( DWORD  dwSpinCount  ) 

bool JetByteTools::Win32::COptex::IsSingleProcessOptex (  )  const

bool JetByteTools::Win32::COptex::TryEnter (  ) 

void JetByteTools::Win32::COptex::Enter (  )  [virtual]

Enter the critical section and lock other threads outside.

Implements JetByteTools::Win32::ICriticalSection.

void JetByteTools::Win32::COptex::Leave (  )  [virtual]

Leave the critical section and allow another thread to enter.

Implements JetByteTools::Win32::ICriticalSection.


Generated on Tue May 8 17:48:14 2007 for JetByte Socket Tools by  doxygen 1.5.2