mirror of
https://github.com/falcosecurity/falco.git
synced 2025-09-16 23:08:16 +00:00
fix(userspace/falco): adopt stricter memory order semantics
Signed-off-by: Jason Dellaluce <jasondellaluce@gmail.com>
This commit is contained in:
@@ -97,8 +97,8 @@ application::run_result application::do_inspect(
|
||||
{
|
||||
rc = inspector->next(&ev);
|
||||
|
||||
if(m_state->terminate.load(std::memory_order_acquire)
|
||||
|| m_state->restart.load(std::memory_order_acquire))
|
||||
if(m_state->terminate.load(std::memory_order_seq_cst)
|
||||
|| m_state->restart.load(std::memory_order_seq_cst))
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
@@ -69,7 +69,7 @@ void application::terminate()
|
||||
{
|
||||
if(m_state != nullptr)
|
||||
{
|
||||
m_state->terminate.store(true, std::memory_order_release);
|
||||
m_state->terminate.store(true, std::memory_order_seq_cst);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ void application::restart()
|
||||
{
|
||||
if(m_state != nullptr)
|
||||
{
|
||||
m_state->restart.store(true, std::memory_order_release);
|
||||
m_state->restart.store(true, std::memory_order_seq_cst);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -66,7 +66,7 @@ void falco_webserver::start(
|
||||
}
|
||||
|
||||
std::atomic<bool> failed;
|
||||
failed.store(false, std::memory_order_relaxed);
|
||||
failed.store(false, std::memory_order_release);
|
||||
m_server_thread = std::thread([this, listen_port, &failed]
|
||||
{
|
||||
try
|
||||
|
Reference in New Issue
Block a user