summaryrefslogtreecommitdiff
path: root/ace/Token.cpp
diff options
context:
space:
mode:
authordhinton <dhinton@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2002-02-25 13:44:52 +0000
committerdhinton <dhinton@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2002-02-25 13:44:52 +0000
commitd9ccf0e593e7f848b0a1bcade69bde6e8b565b4b (patch)
tree7879c1277bfd55983f998fb50a8bf721b242ed3c /ace/Token.cpp
parentd570f1004c04a2f8e7b16749fb5051c049a904cc (diff)
downloadATCD-d9ccf0e593e7f848b0a1bcade69bde6e8b565b4b.tar.gz
ChangeLogTag:Mon Feb 25 13:50:43 2002 UTC Don Hinton <dhinton@ieee.org>
Diffstat (limited to 'ace/Token.cpp')
-rw-r--r--ace/Token.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/ace/Token.cpp b/ace/Token.cpp
index cb2b2d2c618..f15de7d1fe4 100644
--- a/ace/Token.cpp
+++ b/ace/Token.cpp
@@ -165,7 +165,8 @@ ACE_Token::ACE_Token (const ACE_TCHAR *name, void *any)
in_use_ (0),
waiters_ (0),
nesting_level_ (0),
- attributes_ (USYNC_THREAD)
+ attributes_ (USYNC_THREAD),
+ queueing_strategy_ (FIFO)
{
// ACE_TRACE ("ACE_Token::ACE_Token");
}
@@ -231,7 +232,7 @@ ACE_Token::shared_acquire (void (*sleep_hook_func)(void *),
ACE_Token::ACE_Token_Queue_Entry my_entry (this->lock_,
thr_id,
this->attributes_);
- queue->insert_entry (my_entry);
+ queue->insert_entry (my_entry, this->queueing_strategy_);
this->waiters_++;
// Execute appropriate <sleep_hook> callback. (@@ should these
@@ -383,7 +384,10 @@ ACE_Token::renew (int requeue_position,
this->owner_);
this_threads_queue->insert_entry (my_entry,
- requeue_position);
+ // if requeue_position == 0 then we want to go next,
+ // otherwise use the queueing strategy, which might also
+ // happen to be 0.
+ requeue_position == 0 ? 0 : this->queueing_strategy_);
this->waiters_++;
// Remember nesting level...