Skip to content

Commit ef6a48c

Browse files
committed
msg/async/Event: make the pipe byte static
This avoids a stack allocation and assignment. Signed-off-by: Max Kellermann <[email protected]>
1 parent 90d0f03 commit ef6a48c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/msg/async/Event.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ void EventCenter::wakeup()
347347
return ;
348348

349349
ldout(cct, 20) << __func__ << dendl;
350-
char buf = 'c';
350+
static constexpr char buf = 'c';
351351
// wake up "event_wait"
352352
#ifdef _WIN32
353353
int n = send(notify_send_fd, &buf, sizeof(buf), 0);

0 commit comments

Comments
 (0)