]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
msg/async/Event: make the pipe byte static 61018/head
authorMax Kellermann <max.kellermann@ionos.com>
Thu, 3 Oct 2024 15:12:59 +0000 (17:12 +0200)
committerMax Kellermann <max.kellermann@ionos.com>
Tue, 10 Dec 2024 11:05:31 +0000 (12:05 +0100)
This avoids a stack allocation and assignment.

Signed-off-by: Max Kellermann <max.kellermann@ionos.com>
src/msg/async/Event.cc

index 08e117ea54a79a47338b89eb908293c28c99cca3..16abb1368b0249ea27edcf29fcec884fafe71ea9 100644 (file)
@@ -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);