From: Max Kellermann Date: Thu, 3 Oct 2024 15:12:59 +0000 (+0200) Subject: msg/async/Event: make the pipe byte static X-Git-Tag: v20.0.0~499^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ef6a48c8bbe70bda09240ab7ddd4f23e36c2dae7;p=ceph.git msg/async/Event: make the pipe byte static This avoids a stack allocation and assignment. Signed-off-by: Max Kellermann --- diff --git a/src/msg/async/Event.cc b/src/msg/async/Event.cc index 08e117ea54a7..16abb1368b02 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);