aboutsummaryrefslogtreecommitdiffstats
path: root/libtransport/src/hicn/transport/utils/content_store.h
diff options
context:
space:
mode:
authorMichele Papalini <micpapal@cisco.com>2019-10-22 10:00:39 +0000
committerGerrit Code Review <gerrit@fd.io>2019-10-22 10:00:39 +0000
commitc37f17534d4f7eaab692a5ffb252858d48358679 (patch)
treefb128fe2d59ef551016a4d063fee13762856000b /libtransport/src/hicn/transport/utils/content_store.h
parent49b9891dc32ea1fbd0af4711a200b425c7482da0 (diff)
parent755c6833ae2d2eee87e80ed3b84c75e968f48c46 (diff)
Merge "[HICN-328] Reworking setSocketOption and getSocketOption to be thread-safe"
Diffstat (limited to 'libtransport/src/hicn/transport/utils/content_store.h')
-rw-r--r--libtransport/src/hicn/transport/utils/content_store.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/libtransport/src/hicn/transport/utils/content_store.h b/libtransport/src/hicn/transport/utils/content_store.h
index a89403a01..f7dc41835 100644
--- a/libtransport/src/hicn/transport/utils/content_store.h
+++ b/libtransport/src/hicn/transport/utils/content_store.h
@@ -68,8 +68,9 @@ class ContentStore {
ContentStoreHashTable content_store_hash_table_;
FIFOList fifo_list_;
std::shared_ptr<ContentObject> empty_reference_;
- std::size_t max_content_store_size_;
- utils::SpinLock cs_mutex_;
+ // Must be atomic
+ std::atomic_size_t max_content_store_size_;
+ mutable utils::SpinLock cs_mutex_;
};
} // end namespace utils \ No newline at end of file