Make RCU reader return a const pointer (omnibus commit)

This commit is contained in:
Robin Gareus 2023-04-07 23:33:13 +02:00
parent e9f71824a1
commit 295dbd8e1e
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04
58 changed files with 745 additions and 776 deletions

View file

@ -67,7 +67,7 @@ public:
delete managed_object.load ();
}
std::shared_ptr<T> reader () const
std::shared_ptr<T const> reader () const
{
std::shared_ptr<T> rv;

View file

@ -84,7 +84,7 @@ RCUTest::read_thread ()
#endif
for (int i = 0; i < 15000; ++i) {
std::shared_ptr<Values> reader = _values.reader ();
std::shared_ptr<Values const> reader = _values.reader ();
for (Values::const_iterator i = reader->begin (); i != reader->end(); ++i) {
CPPUNIT_ASSERT (i->first == i->second->val);
}