aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/iomgr/fd_posix.h
diff options
context:
space:
mode:
authorGravatar David Klempner <klempner@google.com>2015-01-28 17:00:21 -0800
committerGravatar David Klempner <klempner@google.com>2015-01-28 17:00:21 -0800
commitd178524a748be300bc370a2ade797beda1c5b7bc (patch)
tree2eb6bb7061c779f180c9ea0cf9513300700b9ca1 /src/core/iomgr/fd_posix.h
parentf52188ae10044951706c484e8d7047721d375892 (diff)
Freelist grpc_fd objects
This is necessary for efficient implementations where multiple threads simultaneously sit in epoll_wait and the like on the same pollset.
Diffstat (limited to 'src/core/iomgr/fd_posix.h')
-rw-r--r--src/core/iomgr/fd_posix.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/iomgr/fd_posix.h b/src/core/iomgr/fd_posix.h
index 232de0c3e0..f42ae19579 100644
--- a/src/core/iomgr/fd_posix.h
+++ b/src/core/iomgr/fd_posix.h
@@ -69,6 +69,7 @@ typedef struct grpc_fd {
grpc_iomgr_cb_func on_done;
void *on_done_user_data;
+ struct grpc_fd *freelist_next;
} grpc_fd;
/* Create a wrapped file descriptor.
@@ -135,4 +136,7 @@ void grpc_fd_become_writable(grpc_fd *fd, int allow_synchronous_callback);
void grpc_fd_ref(grpc_fd *fd);
void grpc_fd_unref(grpc_fd *fd);
+void grpc_fd_global_init(void);
+void grpc_fd_global_shutdown(void);
+
#endif /* __GRPC_INTERNAL_IOMGR_FD_POSIX_H_ */