From ef6a48c8bbe70bda09240ab7ddd4f23e36c2dae7 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 3 Oct 2024 17:12:59 +0200 Subject: [PATCH] msg/async/Event: make the pipe byte static This avoids a stack allocation and assignment. Signed-off-by: Max Kellermann --- src/msg/async/Event.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/msg/async/Event.cc b/src/msg/async/Event.cc index 08e117ea54a..16abb1368b0 100644 --- a/src/msg/async/Event.cc +++ b/src/msg/async/Event.cc @@ -347,7 +347,7 @@ void EventCenter::wakeup() return ; ldout(cct, 20) << __func__ << dendl; - char buf = 'c'; + static constexpr char buf = 'c'; // wake up "event_wait" #ifdef _WIN32 int n = send(notify_send_fd, &buf, sizeof(buf), 0); -- 2.39.5