Loading system/gd/os/linux_generic/reactor.cc +2 −2 Original line number Diff line number Diff line Loading @@ -134,7 +134,7 @@ void Reactor::Stop() { LOG_WARN("not running, will stop once it's started"); } auto control = eventfd_write(control_fd_, 1); ASSERT(control != -1) ASSERT(control != -1); } Reactor::Reactable* Reactor::Register(int fd, Closure on_read_ready, Closure on_write_ready) { Loading @@ -152,7 +152,7 @@ Reactor::Reactable* Reactor::Register(int fd, Closure on_read_ready, Closure on_ }; int register_fd; RUN_NO_INTR(register_fd = epoll_ctl(epoll_fd_, EPOLL_CTL_ADD, fd, &event)); ASSERT(register_fd != -1) ASSERT(register_fd != -1); return reactable; } Loading system/gd/os/log.h +15 −13 Original line number Diff line number Diff line Loading @@ -39,8 +39,7 @@ /* syslog didn't work well here since we would be redefining LOG_DEBUG. */ #include <stdio.h> #define LOGWRAPPER(fmt, args...) \ fprintf(stderr, "%s - %s: " fmt "\n", LOG_TAG, __PRETTY_FUNCTION__, ##args) #define LOGWRAPPER(fmt, args...) fprintf(stderr, "%s - %s: " fmt "\n", LOG_TAG, __PRETTY_FUNCTION__, ##args) #define LOG_VERBOSE(...) LOGWRAPPER(__VA_ARGS__) #define LOG_DEBUG(...) LOGWRAPPER(__VA_ARGS__) Loading @@ -51,14 +50,17 @@ #endif /* defined(OS_ANDROID) */ #define ASSERT(condition) \ do { \ if (!(condition)) { \ LOG_ERROR("%s:%d assertion '" #condition "' failed", __FILE__, __LINE__); \ abort(); \ } } \ } while (false) #define ASSERT_LOG(condition, fmt, args...) \ do { \ if (!(condition)) { \ LOG_ERROR("%s:%d assertion '" #condition "' failed - " fmt, __FILE__, __LINE__, ##args); \ abort(); \ } } \ } while (false) Loading
system/gd/os/linux_generic/reactor.cc +2 −2 Original line number Diff line number Diff line Loading @@ -134,7 +134,7 @@ void Reactor::Stop() { LOG_WARN("not running, will stop once it's started"); } auto control = eventfd_write(control_fd_, 1); ASSERT(control != -1) ASSERT(control != -1); } Reactor::Reactable* Reactor::Register(int fd, Closure on_read_ready, Closure on_write_ready) { Loading @@ -152,7 +152,7 @@ Reactor::Reactable* Reactor::Register(int fd, Closure on_read_ready, Closure on_ }; int register_fd; RUN_NO_INTR(register_fd = epoll_ctl(epoll_fd_, EPOLL_CTL_ADD, fd, &event)); ASSERT(register_fd != -1) ASSERT(register_fd != -1); return reactable; } Loading
system/gd/os/log.h +15 −13 Original line number Diff line number Diff line Loading @@ -39,8 +39,7 @@ /* syslog didn't work well here since we would be redefining LOG_DEBUG. */ #include <stdio.h> #define LOGWRAPPER(fmt, args...) \ fprintf(stderr, "%s - %s: " fmt "\n", LOG_TAG, __PRETTY_FUNCTION__, ##args) #define LOGWRAPPER(fmt, args...) fprintf(stderr, "%s - %s: " fmt "\n", LOG_TAG, __PRETTY_FUNCTION__, ##args) #define LOG_VERBOSE(...) LOGWRAPPER(__VA_ARGS__) #define LOG_DEBUG(...) LOGWRAPPER(__VA_ARGS__) Loading @@ -51,14 +50,17 @@ #endif /* defined(OS_ANDROID) */ #define ASSERT(condition) \ do { \ if (!(condition)) { \ LOG_ERROR("%s:%d assertion '" #condition "' failed", __FILE__, __LINE__); \ abort(); \ } } \ } while (false) #define ASSERT_LOG(condition, fmt, args...) \ do { \ if (!(condition)) { \ LOG_ERROR("%s:%d assertion '" #condition "' failed - " fmt, __FILE__, __LINE__, ##args); \ abort(); \ } } \ } while (false)