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

Lamp::WaitSet Class Reference

ウェイトセット More...

#include <WaitSet.h>

Inheritance diagram for Lamp::WaitSet:

Lamp::LockObject Lamp::Runnable Lamp::Thread Lamp::BufferedInput Lamp::StreamPlayer List of all members.

Public Member Functions

 WaitSet ()
 コンストラクタ

 WaitSet (LockObject *lockObject, bool deleteLockObject)
 コンストラクタ

virtual ~WaitSet ()
 デストラクタ

virtual void wait (const Thread *thread)
 待機

virtual void wait ()
 待機 カレントスレッドを待機させます。呼び出すにはWaitSetに対するロックが必要。

virtual void notify ()
 待機解除

virtual void notifyAll ()
 待機全解除

virtual void lock ()
 ロック

virtual void unlock ()
 アンロック

virtual bool isLockedByCurrentThread () const
 カレントスレッドによってロックされているか


Detailed Description

ウェイトセット

Definition at line 39 of file WaitSet.h.


Constructor & Destructor Documentation

Lamp::WaitSet::WaitSet  ) 
 

コンストラクタ

クリティカルセクションによる同期制御を行う

Definition at line 34 of file WaitSet.cpp.

Lamp::WaitSet::WaitSet LockObject lockObject,
bool  deleteLockObject
 

コンストラクタ

Parameters:
lockObject ロックオブジェクト
deleteLockObject ロックオブジェクトをWaitSetが削除するならtrue

Definition at line 39 of file WaitSet.cpp.

References Assert, and NULL.


Member Function Documentation

virtual bool Lamp::WaitSet::isLockedByCurrentThread  )  const [inline, virtual]
 

カレントスレッドによってロックされているか

Returns:
カレントスレッドによってロックされていればtrue

Implements Lamp::LockObject.

Definition at line 105 of file WaitSet.h.

References Lamp::LockObject::isLockedByCurrentThread().

Referenced by notify(), notifyAll(), and wait().

void Lamp::WaitSet::notify  )  [virtual]
 

待機解除

一つのスレッドの待機を解除します。呼び出すにはWaitSetに対するロックが必要。

Definition at line 89 of file WaitSet.cpp.

References ErrorOut, Lamp::Deque< HANDLE >::getCount(), isLockedByCurrentThread(), and Lamp::Deque< HANDLE >::popFront().

void Lamp::WaitSet::notifyAll  )  [virtual]
 

待機全解除

全てのスレッドの待機を解除します。呼び出すにはWaitSetに対するロックが必要。

Definition at line 102 of file WaitSet.cpp.

References Lamp::Deque< HANDLE >::clear(), ErrorOut, Lamp::Deque< HANDLE >::get(), Lamp::Deque< HANDLE >::getCount(), and isLockedByCurrentThread().

void Lamp::WaitSet::wait const Thread thread  )  [virtual]
 

待機

Parameters:
thread 待機させるスレッド
引数のスレッドを待機させます。呼び出すにはWaitSetに対するロックが必要。 カレントスレッド版より高速に動作します。

Definition at line 51 of file WaitSet.cpp.

References ErrorOut, Lamp::Thread::getThreadHandle(), isLockedByCurrentThread(), lock(), Lamp::Deque< HANDLE >::pushBack(), and unlock().


The documentation for this class was generated from the following files:
Generated on Wed Mar 16 10:29:53 2005 for Lamp by doxygen 1.3.2