diff options
author | Tor Brede Vekterli <vekterli@vespa.ai> | 2023-10-25 12:56:19 +0000 |
---|---|---|
committer | Tor Brede Vekterli <vekterli@vespa.ai> | 2023-10-25 12:56:19 +0000 |
commit | 38e7a12b1102641732c66c7bb3e3493654c3fe22 (patch) | |
tree | 7b6873ff30ab90362ca1243f7913b5af1720002e /storage/src/vespa | |
parent | 2b7b0c032cf87883593a5e5d277a192eee5c5e4c (diff) |
Avoid using a reserved identifier naming format
Identifiers of the form `_Uppercased` are considered reserved by
the standard. Not likely to cause ambiguity in practice, but it's
preferable to stay on the good side of the standard-gods.
Diffstat (limited to 'storage/src/vespa')
-rw-r--r-- | storage/src/vespa/storage/persistence/filestorage/filestormanager.cpp | 8 | ||||
-rw-r--r-- | storage/src/vespa/storageapi/messageapi/storagemessage.cpp | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/storage/src/vespa/storage/persistence/filestorage/filestormanager.cpp b/storage/src/vespa/storage/persistence/filestorage/filestormanager.cpp index 6c49fcd0878..e6cd8987c0a 100644 --- a/storage/src/vespa/storage/persistence/filestorage/filestormanager.cpp +++ b/storage/src/vespa/storage/persistence/filestorage/filestormanager.cpp @@ -170,7 +170,7 @@ dynamic_throttle_params_from_config(const StorFilestorConfig& config, uint32_t n #define TLS_LINKAGE __attribute__((visibility("hidden"), tls_model("local-exec"))) #endif -thread_local PersistenceHandler * _G_threadLocalHandler TLS_LINKAGE = nullptr; +thread_local PersistenceHandler * _g_threadLocalHandler TLS_LINKAGE = nullptr; size_t computeAllPossibleHandlerThreads(const vespa::config::content::StorFilestorConfig & cfg) { @@ -198,10 +198,10 @@ FileStorManager::createRegisteredHandler(const ServiceLayerComponent & component PersistenceHandler & FileStorManager::getThreadLocalHandler() { - if (_G_threadLocalHandler == nullptr) { - _G_threadLocalHandler = & createRegisteredHandler(_component); + if (_g_threadLocalHandler == nullptr) { + _g_threadLocalHandler = & createRegisteredHandler(_component); } - return *_G_threadLocalHandler; + return *_g_threadLocalHandler; } void diff --git a/storage/src/vespa/storageapi/messageapi/storagemessage.cpp b/storage/src/vespa/storageapi/messageapi/storagemessage.cpp index 5a836ec1021..f62c6410882 100644 --- a/storage/src/vespa/storageapi/messageapi/storagemessage.cpp +++ b/storage/src/vespa/storageapi/messageapi/storagemessage.cpp @@ -13,7 +13,7 @@ namespace storage::api { namespace { -std::atomic<uint64_t> _G_lastMsgId(1000); +std::atomic<uint64_t> _g_lastMsgId(1000); } @@ -231,7 +231,7 @@ TransportContext::~TransportContext() = default; StorageMessage::Id StorageMessage::generateMsgId() noexcept { - return _G_lastMsgId.fetch_add(1, std::memory_order_relaxed); + return _g_lastMsgId.fetch_add(1, std::memory_order_relaxed); } StorageMessage::StorageMessage(const MessageType& type, Id internal_id, Id originator_id) noexcept |