pull/15459/head
Muxi Yan 7 years ago
parent a2a3261834
commit fe5989ecf5
  1. 2
      src/core/lib/iomgr/ev_epoll1_linux.cc
  2. 2
      src/core/lib/iomgr/ev_epollex_linux.cc
  3. 2
      src/core/lib/iomgr/ev_poll_posix.cc
  4. 18
      src/core/lib/iomgr/polling_entity.cc
  5. 2
      src/core/lib/iomgr/tcp_posix.cc
  6. 2
      src/core/lib/iomgr/tcp_server_posix.cc
  7. 2
      src/core/lib/iomgr/tcp_server_utils_posix_common.cc
  8. 6
      src/core/lib/transport/transport.cc
  9. 1
      src/objective-c/GRPCClient/private/GRPCCompletionQueue.m

@ -1244,5 +1244,5 @@ const grpc_event_engine_vtable* grpc_init_epoll1_linux(bool explicit_request) {
const grpc_event_engine_vtable* grpc_init_epoll1_linux(bool explicit_request) { const grpc_event_engine_vtable* grpc_init_epoll1_linux(bool explicit_request) {
return nullptr; return nullptr;
} }
#endif /* defined(GRPC_POSIX_SOCKET) */ #endif /* defined(GRPC_POSIX_SOCKET_EV_EPOLL1) */
#endif /* !defined(GRPC_LINUX_EPOLL) */ #endif /* !defined(GRPC_LINUX_EPOLL) */

@ -1508,6 +1508,6 @@ const grpc_event_engine_vtable* grpc_init_epollex_linux(
bool explicitly_requested) { bool explicitly_requested) {
return nullptr; return nullptr;
} }
#endif /* defined(GRPC_POSIX_SOCKET) */ #endif /* defined(GRPC_POSIX_SOCKET_EV_EPOLLEX) */
#endif /* !defined(GRPC_LINUX_EPOLL_CREATE1) */ #endif /* !defined(GRPC_LINUX_EPOLL_CREATE1) */

@ -1761,4 +1761,4 @@ const grpc_event_engine_vtable* grpc_init_poll_cv_posix(bool explicit_request) {
return &vtable; return &vtable;
} }
#endif #endif /* GRPC_POSIX_SOCKET_EV_POLL */

@ -61,9 +61,12 @@ bool grpc_polling_entity_is_empty(const grpc_polling_entity* pollent) {
void grpc_polling_entity_add_to_pollset_set(grpc_polling_entity* pollent, void grpc_polling_entity_add_to_pollset_set(grpc_polling_entity* pollent,
grpc_pollset_set* pss_dst) { grpc_pollset_set* pss_dst) {
if (pollent->tag == GRPC_POLLS_POLLSET) { if (pollent->tag == GRPC_POLLS_POLLSET) {
if (pollent->pollent.pollset != nullptr) { #ifdef GRPC_CFSTREAM
grpc_pollset_set_add_pollset(pss_dst, pollent->pollent.pollset); GPR_ASSERT(pollent->pollent.pollset == nullptr);
} #else
GPR_ASSERT(pollent->pollent.pollset != nullptr);
grpc_pollset_set_add_pollset(pss_dst, pollent->pollent.pollset);
#endif
} else if (pollent->tag == GRPC_POLLS_POLLSET_SET) { } else if (pollent->tag == GRPC_POLLS_POLLSET_SET) {
GPR_ASSERT(pollent->pollent.pollset_set != nullptr); GPR_ASSERT(pollent->pollent.pollset_set != nullptr);
grpc_pollset_set_add_pollset_set(pss_dst, pollent->pollent.pollset_set); grpc_pollset_set_add_pollset_set(pss_dst, pollent->pollent.pollset_set);
@ -76,9 +79,12 @@ void grpc_polling_entity_add_to_pollset_set(grpc_polling_entity* pollent,
void grpc_polling_entity_del_from_pollset_set(grpc_polling_entity* pollent, void grpc_polling_entity_del_from_pollset_set(grpc_polling_entity* pollent,
grpc_pollset_set* pss_dst) { grpc_pollset_set* pss_dst) {
if (pollent->tag == GRPC_POLLS_POLLSET) { if (pollent->tag == GRPC_POLLS_POLLSET) {
if (pollent->pollent.pollset != nullptr) { #ifdef GRPC_CFSTREAM
grpc_pollset_set_del_pollset(pss_dst, pollent->pollent.pollset); GPR_ASSERT(pollent->pollent.pollset == nullptr);
} #else
GPR_ASSERT(pollent->pollent.pollset != nullptr);
grpc_pollset_set_del_pollset(pss_dst, pollent->pollent.pollset);
#endif
} else if (pollent->tag == GRPC_POLLS_POLLSET_SET) { } else if (pollent->tag == GRPC_POLLS_POLLSET_SET) {
GPR_ASSERT(pollent->pollent.pollset_set != nullptr); GPR_ASSERT(pollent->pollent.pollset_set != nullptr);
grpc_pollset_set_del_pollset_set(pss_dst, pollent->pollent.pollset_set); grpc_pollset_set_del_pollset_set(pss_dst, pollent->pollent.pollset_set);

@ -811,4 +811,4 @@ void grpc_tcp_destroy_and_release_fd(grpc_endpoint* ep, int* fd,
TCP_UNREF(tcp, "destroy"); TCP_UNREF(tcp, "destroy");
} }
#endif #endif /* GRPC_POSIX_SOCKET_TCP */

@ -558,4 +558,4 @@ grpc_tcp_server_vtable grpc_posix_tcp_server_vtable = {
tcp_server_shutdown_starting_add, tcp_server_shutdown_starting_add,
tcp_server_unref, tcp_server_unref,
tcp_server_shutdown_listeners}; tcp_server_shutdown_listeners};
#endif #endif /* GRPC_POSIX_SOCKET_TCP_SERVER */

@ -205,4 +205,4 @@ error:
return ret; return ret;
} }
#endif /* GRPC_POSIX_SOCKET */ #endif /* GRPC_POSIX_SOCKET_TCP_SERVER_UTILS_COMMON */

@ -184,7 +184,11 @@ void grpc_transport_set_pops(grpc_transport* transport, grpc_stream* stream,
nullptr) { nullptr) {
transport->vtable->set_pollset_set(transport, stream, pollset_set); transport->vtable->set_pollset_set(transport, stream, pollset_set);
} else { } else {
// No-op for empty pollset #ifdef GRPC_CFSTREAM
// No-op for empty pollset
#else
abort();
#endif
} }
} }

@ -43,7 +43,6 @@ const grpc_completion_queue_attributes kCompletionQueueAttr = {
if ((self = [super init])) { if ((self = [super init])) {
_unmanagedQueue = grpc_completion_queue_create( _unmanagedQueue = grpc_completion_queue_create(
grpc_completion_queue_factory_lookup(&kCompletionQueueAttr), &kCompletionQueueAttr, NULL); grpc_completion_queue_factory_lookup(&kCompletionQueueAttr), &kCompletionQueueAttr, NULL);
//_unmanagedQueue = grpc_completion_queue_create_for_next(NULL);
// This is for the following block to capture the pointer by value (instead // This is for the following block to capture the pointer by value (instead
// of retaining self and doing self->_unmanagedQueue). This is essential // of retaining self and doing self->_unmanagedQueue). This is essential

Loading…
Cancel
Save