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

PrivateMutexContext Struct Reference

Collaboration diagram for PrivateMutexContext:

Collaboration graph
[legend]
List of all members.

Public Methods

 PrivateMutexContext (Mutex::MutexType i_type)
 ~PrivateMutexContext ()
virtual void Lock ()
bool CheckThisThreadHoldsLock ()
bool TryLock ()
void Unlock ()
bool WakeConditional ()

Public Attributes

SpinLock m_spin_lock
HANDLE m_os_semaphore
bool m_recusive
unsigned m_recusion_count
Task::TaskID m_task_id
PrivateConditionalContextm_conditional_list

Constructor & Destructor Documentation

PrivateMutexContext::PrivateMutexContext Mutex::MutexType    i_type [inline]
 

PrivateMutexContext::~PrivateMutexContext   [inline]
 


Member Function Documentation

bool PrivateMutexContext::CheckThisThreadHoldsLock   [inline]
 

This checks that this thread is the thread holding the lock.

virtual void PrivateMutexContext::Lock   [inline, virtual]
 

Attempt to lock the mutex.

Returns:
nothing

bool PrivateMutexContext::TryLock   [inline]
 

TryLock will attempt to take the lock without waiting

void PrivateMutexContext::Unlock   [inline]
 

Unlock this lock. This combines the conditional lock.

bool PrivateMutexContext::WakeConditional  
 

WakeConditional will awaken the conditional variable (if any)

Returns:
nothing


Member Data Documentation

PrivateConditionalContext* PrivateMutexContext::m_conditional_list
 

The list of conditional variables that need awakening.

HANDLE PrivateMutexContext::m_os_semaphore
 

Each mutex has an OS handle to a mutex. This is locked once attempts to attain the spin lock have failed.

unsigned PrivateMutexContext::m_recusion_count
 

m_recusion_count is the number of times this is locked.

bool PrivateMutexContext::m_recusive
 

m_recusive indicates that this is a recursive lock

SpinLock PrivateMutexContext::m_spin_lock
 

m_spin_lock is the basic spin lock - it will fail to get the lock after a small number of cycles.

Task::TaskID PrivateMutexContext::m_task_id
 

m_task_id is the ID of the task that currently holds this lock.


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

Generated for Austria by doxygen and MakeXS at Sun Oct 24 17:35:34 PDT 2004