#include <Token.h>
Collaboration diagram for ACE_Token::ACE_Token_Queue_Entry:
Public Member Functions | |
ACE_Token_Queue_Entry (ACE_Thread_Mutex &m, ACE_thread_t t_id) | |
Constructor. | |
ACE_Token_Queue_Entry (ACE_Thread_Mutex &m, ACE_thread_t t_id, ACE_Condition_Attributes &attributes) | |
Constructor using a pre-allocated attributes. | |
int | wait (ACE_Time_Value *timeout, ACE_Thread_Mutex &lock) |
Entry blocks on the token. | |
int | signal (void) |
Notify (unblock) the entry. | |
Public Attributes | |
ACE_Token_Queue_Entry * | next_ |
Pointer to next waiter. | |
ACE_thread_t | thread_id_ |
ACE_Thread id of this waiter. | |
ACE_Semaphore | cv_ |
ACE_Semaphore object used to wake up waiter when it can run again. | |
int | runable_ |
Ok to run. |
Definition at line 221 of file Token.h.
|
Constructor.
Definition at line 44 of file Token.cpp. References ACE_TOKEN_USES_SEMAPHORE, and ACE_TRACE.
00046 : next_ (0), 00047 thread_id_ (t_id), 00048 #if defined (ACE_TOKEN_USES_SEMAPHORE) 00049 cv_ (0), 00050 #else 00051 cv_ (m), 00052 #endif /* ACE_TOKEN_USES_SEMAPHORE */ 00053 runable_ (0) 00054 { 00055 #if defined (ACE_TOKEN_USES_SEMAPHORE) 00056 ACE_UNUSED_ARG (m); 00057 #endif /* ACE_TOKEN_USES_SEMAPHORE */ 00058 00059 ACE_TRACE ("ACE_Token::ACE_Token_Queue_Entry::ACE_Token_Queue_Entry"); 00060 } |
|
Constructor using a pre-allocated attributes.
Definition at line 62 of file Token.cpp. References ACE_TOKEN_USES_SEMAPHORE, and ACE_TRACE.
00065 : next_ (0), 00066 thread_id_ (t_id), 00067 #if defined (ACE_TOKEN_USES_SEMAPHORE) 00068 cv_ (0), 00069 #else 00070 cv_ (m, attributes), 00071 #endif /* ACE_TOKEN_USES_SEMAPHORE */ 00072 runable_ (0) 00073 { 00074 #if defined (ACE_TOKEN_USES_SEMAPHORE) 00075 ACE_UNUSED_ARG (m); 00076 ACE_UNUSED_ARG (attributes); 00077 #endif /* ACE_TOKEN_USES_SEMAPHORE */ 00078 00079 ACE_TRACE ("ACE_Token::ACE_Token_Queue_Entry::ACE_Token_Queue_Entry"); 00080 } |
|
Notify (unblock) the entry.
Definition at line 135 of file Token.inl. References cv_, and ACE_Semaphore::release(). Referenced by ACE_Token::wakeup_next_waiter().
|
|
Entry blocks on the token.
Definition at line 119 of file Token.inl. References ACE_Semaphore::acquire(), and cv_. Referenced by ACE_Token::renew(), and ACE_Token::shared_acquire().
00120 { 00121 #if defined (ACE_TOKEN_USES_SEMAPHORE) 00122 lock.release (); 00123 int const retv = (timeout == 0 ? 00124 this->cv_.acquire () : 00125 this->cv_.acquire (*timeout)); 00126 lock.acquire (); 00127 return retv; 00128 #else 00129 ACE_UNUSED_ARG (lock); 00130 return this->cv_.wait (timeout); 00131 #endif /* ACE_TOKEN_USES_SEMAPHORE */ 00132 } |
|
ACE_Semaphore object used to wake up waiter when it can run again.
|
|
Pointer to next waiter.
Definition at line 239 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 253 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 242 of file Token.h. Referenced by ACE_Token::renew(), and ACE_Token::wakeup_next_waiter(). |