#include <Token.h>
Collaboration diagram for ACE_Token::ACE_Token_Queue_Entry:

Public Methods | |
| ACE_Token_Queue_Entry (ACE_Thread_Mutex &m, ACE_thread_t t_id) | |
| Constructor. More... | |
| ACE_Token_Queue_Entry (ACE_Thread_Mutex &m, ACE_thread_t t_id, ACE_Condition_Attributes &attributes) | |
| Constructor using a pre-allocated attributes. More... | |
| int | wait (ACE_Time_Value *timeout, ACE_Thread_Mutex &lock) |
| Entry blocks on the token. More... | |
| int | signal (void) |
| Notify (unblock) the entry. More... | |
Public Attributes | |
| ACE_Token_Queue_Entry * | next_ |
| Pointer to next waiter. More... | |
| ACE_thread_t | thread_id_ |
| ACE_Thread id of this waiter. More... | |
| ACE_Semaphore | cv_ |
| ACE_Semaphore object used to wake up waiter when it can run again. More... | |
| int | runable_ |
| Ok to run. More... | |
Definition at line 202 of file Token.h.
|
||||||||||||
|
Constructor.
Definition at line 41 of file Token.cpp. References ACE_thread_t, ACE_TOKEN_USES_SEMAPHORE, and ACE_TRACE.
00043 : next_ (0), 00044 thread_id_ (t_id), 00045 #if defined (ACE_TOKEN_USES_SEMAPHORE) 00046 cv_ (0), 00047 #else 00048 cv_ (m), 00049 #endif /* ACE_TOKEN_USES_SEMAPHORE */ 00050 runable_ (0) 00051 { 00052 #if defined (ACE_TOKEN_USES_SEMAPHORE) 00053 ACE_UNUSED_ARG (m); 00054 #endif /* ACE_TOKEN_USES_SEMAPHORE */ 00055 00056 ACE_TRACE ("ACE_Token::ACE_Token_Queue_Entry::ACE_Token_Queue_Entry"); 00057 } |
|
||||||||||||||||
|
Constructor using a pre-allocated attributes.
Definition at line 59 of file Token.cpp. References ACE_thread_t, ACE_TOKEN_USES_SEMAPHORE, and ACE_TRACE.
00062 : next_ (0), 00063 thread_id_ (t_id), 00064 #if defined (ACE_TOKEN_USES_SEMAPHORE) 00065 cv_ (0), 00066 #else 00067 cv_ (m, attributes), 00068 #endif /* ACE_TOKEN_USES_SEMAPHORE */ 00069 runable_ (0) 00070 { 00071 #if defined (ACE_TOKEN_USES_SEMAPHORE) 00072 ACE_UNUSED_ARG (m); 00073 ACE_UNUSED_ARG (attributes); 00074 #endif /* ACE_TOKEN_USES_SEMAPHORE */ 00075 00076 ACE_TRACE ("ACE_Token::ACE_Token_Queue_Entry::ACE_Token_Queue_Entry"); 00077 } |
|
|
Notify (unblock) the entry.
Definition at line 127 of file Token.i. References cv_, and ACE_Semaphore::release.
|
|
||||||||||||
|
Entry blocks on the token.
Definition at line 111 of file Token.i. References ACE_Thread_Mutex::acquire, ACE_Semaphore::acquire, cv_, and ACE_Thread_Mutex::release. Referenced by ACE_Token::renew, and ACE_Token::shared_acquire.
00112 {
00113 #if defined (ACE_TOKEN_USES_SEMAPHORE)
00114 lock.release ();
00115 int retv = (timeout == 0 ?
00116 this->cv_.acquire () :
00117 this->cv_.acquire (*timeout));
00118 lock.acquire ();
00119 return retv;
00120 #else
00121 ACE_UNUSED_ARG (lock);
00122 return this->cv_.wait (timeout);
00123 #endif /* ACE_TOKEN_USES_SEMAPHORE */
00124 }
|
|
|
ACE_Semaphore object used to wake up waiter when it can run again.
|
|
|
Pointer to next waiter.
Definition at line 220 of file Token.h. Referenced by ACE_Token::ACE_Token_Queue::insert_entry, and ACE_Token::ACE_Token_Queue::remove_entry. |
|
|
Ok to run.
Definition at line 234 of file Token.h. Referenced by ACE_Token::renew, ACE_Token::shared_acquire, and ACE_Token::wakeup_next_waiter. |
|
|
ACE_Thread id of this waiter.
Definition at line 223 of file Token.h. Referenced by ACE_Token::renew. |
1.2.14 written by Dimitri van Heesch,
© 1997-2002