Convert __sync* built-ins to std::atomic

Also converts thread_queue_hack to a simpler reserved vector
This commit is contained in:
kannibalox
2024-12-01 13:30:05 -05:00
committed by Jari Sundell
parent 73c1233dc0
commit 0ea7615d0a
5 changed files with 44 additions and 117 deletions
+2 -8
View File
@@ -57,7 +57,7 @@ public:
virtual void init_thread();
rpc::SCgi* scgi() { return m_safe.scgi; }
rpc::SCgi* scgi() { return m_scgi; }
bool set_scgi(rpc::SCgi* scgi);
void set_xmlrpc_log(const std::string& filename);
@@ -70,13 +70,7 @@ private:
void change_xmlrpc_log();
struct lt_cacheline_aligned safe_type {
safe_type() : scgi(NULL) {}
rpc::SCgi* scgi;
};
safe_type m_safe;
std::atomic<rpc::SCgi*> lt_cacheline_aligned m_scgi{ nullptr };
// The following types shall only be modified while holding the
// global lock.