summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authornanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-03-04 18:30:02 +0000
committernanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-03-04 18:30:02 +0000
commitd0331e9076b777789a3a55bc0998641d7165eb8a (patch)
treef0838de70cd9c2402e4a9ac2529d094a964f7efe /tests
parentd5b1613812cac1a2decef1095e8e9a62fc0d3c9e (diff)
downloadATCD-d0331e9076b777789a3a55bc0998641d7165eb8a.tar.gz
Made increment of <role_> thread-safe.
Diffstat (limited to 'tests')
-rw-r--r--tests/Message_Queue_Notifications_Test.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/Message_Queue_Notifications_Test.cpp b/tests/Message_Queue_Notifications_Test.cpp
index c735b575c39..14fabb49f78 100644
--- a/tests/Message_Queue_Notifications_Test.cpp
+++ b/tests/Message_Queue_Notifications_Test.cpp
@@ -304,10 +304,8 @@ Watermark_Test::print_producer_debug_message (void)
int
Watermark_Test::svc (void)
{
- int role = this->role_.value ();
- // Be sure to use the prefix operator++!!!! We've witnessed
- // race conditions with the postfix operator++.
- ++this->role_;
+ // this->role_ is an Atomic_Op object.
+ int role = this->role_++;
switch (role)
{