Skip to content

Commit

Permalink
msg/async: remove the unnecessary checking to wakup event_wait
Browse files Browse the repository at this point in the history
Signed-off-by: Zhi Zhang <zhangz.david@outlook.com>
  • Loading branch information
Zhi Zhang committed Jun 27, 2016
1 parent 14999db commit 560dc32
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/msg/async/Event.cc
Expand Up @@ -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()
Expand Down

0 comments on commit 560dc32

Please sign in to comment.