From 560dc32771be00664c4b22a0ebca5190cd246e0a Mon Sep 17 00:00:00 2001 From: Zhi Zhang Date: Mon, 27 Jun 2016 12:59:08 +0800 Subject: [PATCH] msg/async: remove the unnecessary checking to wakup event_wait Signed-off-by: Zhi Zhang --- src/msg/async/Event.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/msg/async/Event.cc b/src/msg/async/Event.cc index 41157e4c3ad1a..eb20406774e7d 100644 --- a/src/msg/async/Event.cc +++ b/src/msg/async/Event.cc @@ -262,15 +262,15 @@ void EventCenter::delete_time_event(uint64_t id) void EventCenter::wakeup() { - if (already_wakeup.compare_and_swap(0, 1)) { ldout(cct, 1) << __func__ << dendl; + already_wakeup.compare_and_swap(0, 1); + char buf[1]; buf[0] = 'c'; // wake up "event_wait" int n = write(notify_send_fd, buf, 1); // FIXME ? assert(n == 1); - } } int EventCenter::process_time_events() -- 2.47.3