Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(318)

Unified Diff: runtime/bin/eventhandler_linux.cc

Issue 165723007: Move signal_blocker to platform and use it by default in TEMP_FAILURE_RETRY. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: runtime/bin/eventhandler_linux.cc
diff --git a/runtime/bin/eventhandler_linux.cc b/runtime/bin/eventhandler_linux.cc
index 73f2947db7d90f02d2c8f8905a1dd2a86caee36a..4938523eb41f74952dc19756727209a0672ca671 100644
--- a/runtime/bin/eventhandler_linux.cc
+++ b/runtime/bin/eventhandler_linux.cc
@@ -21,7 +21,7 @@
#include "bin/fdutils.h"
#include "bin/log.h"
#include "bin/socket.h"
-#include "platform/hashmap.h"
+#include "platform/signal_blocker.h"
#include "platform/thread.h"
#include "platform/utils.h"
@@ -44,10 +44,7 @@ static void AddToEpollInstance(intptr_t epoll_fd_,
FATAL("Illigal port sent to event handler");
}
event.data.u64 = port;
- int status = TEMP_FAILURE_RETRY(epoll_ctl(epoll_fd_,
- EPOLL_CTL_ADD,
- fd,
- &event));
+ int status = epoll_ctl(epoll_fd_, EPOLL_CTL_ADD, fd, &event);
if (status == -1) {
// Epoll does not accept the file descriptor. It could be due to
// already closed file descriptor, or unuspported devices, such
@@ -62,12 +59,12 @@ EventHandlerImplementation::EventHandlerImplementation() : shutdown_(false) {
// The initial size passed to epoll_create is ignore on newer (>=
// 2.6.8) Linux versions
static const int kEpollInitialSize = 64;
- epoll_fd_ = TEMP_FAILURE_RETRY(epoll_create(kEpollInitialSize));
+ epoll_fd_ = epoll_create(kEpollInitialSize);
if (epoll_fd_ == -1) {
FATAL("Failed creating epoll file descriptor");
}
FDUtils::SetCloseOnExec(epoll_fd_);
- timer_fd_ = TEMP_FAILURE_RETRY(timerfd_create(CLOCK_REALTIME, TFD_CLOEXEC));
+ timer_fd_ = timerfd_create(CLOCK_REALTIME, TFD_CLOEXEC);
if (epoll_fd_ == -1) {
FATAL("Failed creating timerfd file descriptor");
}
@@ -75,10 +72,7 @@ EventHandlerImplementation::EventHandlerImplementation() : shutdown_(false) {
struct epoll_event event;
event.events = EPOLLIN;
event.data.u64 = ILLEGAL_PORT; // Use ILLEGAL_PORT to identify timer-fd.
- int status = TEMP_FAILURE_RETRY(epoll_ctl(epoll_fd_,
- EPOLL_CTL_ADD,
- timer_fd_,
- &event));
+ int status = epoll_ctl(epoll_fd_, EPOLL_CTL_ADD, timer_fd_, &event);
if (status == -1) {
FATAL2(
"Failed adding timerfd fd(%i) to epoll instance: %i", timer_fd_, errno);

Powered by Google App Engine
This is Rietveld 408576698