aboutsummaryrefslogtreecommitdiffstats
path: root/tests/libsample/bucket.h
diff options
context:
space:
mode:
authorHugo Lima <hugo.lima@openbossa.org>2010-01-18 17:58:44 -0200
committerHugo Lima <hugo.lima@openbossa.org>2010-01-18 17:58:44 -0200
commit258702853d4cc7ce09d0862cecb2fa08d986da7e (patch)
tree9924adb86720dabb6019c8f5f1c2b83c417f2979 /tests/libsample/bucket.h
parentae513bfa93f194acb7ed7e358ae65812e2f4c214 (diff)
Bucket::m_locked is accessed by multiple threads and must be volatile,
otherwise the code won't work with some compiler optimizations turned on. Reviewed by Marcelo Lira <marcelo.lira@openbossa.org>
Diffstat (limited to 'tests/libsample/bucket.h')
-rw-r--r--tests/libsample/bucket.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/libsample/bucket.h b/tests/libsample/bucket.h
index d85b92235..127cfcdf7 100644
--- a/tests/libsample/bucket.h
+++ b/tests/libsample/bucket.h
@@ -57,7 +57,7 @@ public:
private:
std::list<int> m_data;
- bool m_locked;
+ volatile bool m_locked;
};
#endif // BUCKET_H