diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1999-07-08 04:39:17 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1999-07-08 04:39:17 +0000 |
commit | e986ec75fc0edc25ee124df915d50e7c1013f060 (patch) | |
tree | 6ba2a710ec286af31b739fc7b650bc14a3ac9f6c /ace | |
parent | 68e6b5736f5aceadc5c40294fe00d24388f27ffd (diff) | |
download | ATCD-e986ec75fc0edc25ee124df915d50e7c1013f060.tar.gz |
*** empty log message ***
Diffstat (limited to 'ace')
-rw-r--r-- | ace/Token.cpp | 6 | ||||
-rw-r--r-- | ace/Token.h | 28 |
2 files changed, 17 insertions, 17 deletions
diff --git a/ace/Token.cpp b/ace/Token.cpp index cd84e5ac9fe..d01102badc3 100644 --- a/ace/Token.cpp +++ b/ace/Token.cpp @@ -120,9 +120,9 @@ ACE_Token::shared_acquire (void (*sleep_hook_func)(void *), ACE_thread_t thr_id = ACE_Thread::self (); - ACE_Token_Queue *queue = (op_type == ACE_Token::READ_TOKEN ? - &this->readers_ : - &this->writers_); + ACE_Token_Queue *queue = (op_type == ACE_Token::READ_TOKEN + ? &this->readers_ + : &this->writers_); #if defined (DEBUGGING) cerr << '(' << ACE_Thread::self () << ')' diff --git a/ace/Token.h b/ace/Token.h index 40710310973..6d13d0089ec 100644 --- a/ace/Token.h +++ b/ace/Token.h @@ -69,19 +69,18 @@ public: int acquire (void (*sleep_hook)(void *), void *arg = 0, ACE_Time_Value *timeout = 0); - // Acquire the token, sleeping until it is obtained or until - // <timeout> expires. If some other thread currently holds the - // token then <sleep_hook> is called before our thread goes to - // sleep. This <sleep_hook> can be used by the requesting thread to - // unblock a token-holder that is sleeping, e.g., by means of - // writing to a pipe (the ACE ACE_Reactor uses this functionality). - // Return values: - // 0 if acquires without calling <sleep_hook> - // 1 if <sleep_hook> is called. - // 2 if the token is signaled. - // -1 if failure or timeout occurs (if timeout occurs errno == ETIME) - // If <timeout> == <&ACE_Time_Value::zero> then acquire has polling - // semantics (and does *not* call <sleep_hook>). + // Acquire the token, sleeping until it is obtained or until the + // expiration of <timeout>, which is treated as "absolute" time. If + // some other thread currently holds the token then <sleep_hook> is + // called before our thread goes to sleep. This <sleep_hook> can be + // used by the requesting thread to unblock a token-holder that is + // sleeping, e.g., by means of writing to a pipe (the ACE + // ACE_Reactor uses this functionality). Return values: 0 if + // acquires without calling <sleep_hook> 1 if <sleep_hook> is + // called. 2 if the token is signaled. -1 if failure or timeout + // occurs (if timeout occurs errno == ETIME) If <timeout> == + // <&ACE_Time_Value::zero> then acquire has polling semantics (and + // does *not* call <sleep_hook>). int acquire (ACE_Time_Value *timeout = 0); // This behaves just like the previous <acquire> method, except @@ -93,7 +92,8 @@ public: // the appropriate behavior before <acquire> goes to sleep. // By default, this is a no-op... - int renew (int requeue_position = 0, ACE_Time_Value *timeout = 0); + int renew (int requeue_position = 0, + ACE_Time_Value *timeout = 0); // An optimized method that efficiently reacquires the token if no // other threads are waiting. This is useful for situations where // you don't want to degrad the quality of service if there are |