aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2015-06-02 16:12:24 -0700
committerGravatar Craig Tiller <ctiller@google.com>2015-06-02 16:12:24 -0700
commit4b678bd7227952da8d3a690db64baf0ff1af1d2f (patch)
tree5c1f513c473b500e9a14b21ebb8afd23b3c08f01 /test
parent79e11c6d058f397003c6528f5773c067ccb2fcb7 (diff)
Fix threading problem on early orphaning
Diffstat (limited to 'test')
-rw-r--r--test/core/iomgr/fd_posix_test.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/core/iomgr/fd_posix_test.c b/test/core/iomgr/fd_posix_test.c
index 2d1ae45bc5..b1be316a4e 100644
--- a/test/core/iomgr/fd_posix_test.c
+++ b/test/core/iomgr/fd_posix_test.c
@@ -120,7 +120,7 @@ static void session_shutdown_cb(void *arg, /*session*/
int success) {
session *se = arg;
server *sv = se->sv;
- grpc_fd_orphan(se->em_fd, NULL);
+ grpc_fd_orphan(se->em_fd, NULL, "a");
gpr_free(se);
/* Start to shutdown listen fd. */
grpc_fd_shutdown(sv->em_fd);
@@ -175,7 +175,7 @@ static void session_read_cb(void *arg, /*session*/
static void listen_shutdown_cb(void *arg /*server*/, int success) {
server *sv = arg;
- grpc_fd_orphan(sv->em_fd, NULL);
+ grpc_fd_orphan(sv->em_fd, NULL, "b");
gpr_mu_lock(GRPC_POLLSET_MU(&g_pollset));
sv->done = 1;
@@ -284,7 +284,7 @@ static void client_init(client *cl) {
/* Called when a client upload session is ready to shutdown. */
static void client_session_shutdown_cb(void *arg /*client*/, int success) {
client *cl = arg;
- grpc_fd_orphan(cl->em_fd, NULL);
+ grpc_fd_orphan(cl->em_fd, NULL, "c");
cl->done = 1;
grpc_pollset_kick(&g_pollset);
}
@@ -472,7 +472,7 @@ static void test_grpc_fd_change(void) {
GPR_ASSERT(b.cb_that_ran == second_read_callback);
gpr_mu_unlock(GRPC_POLLSET_MU(&g_pollset));
- grpc_fd_orphan(em_fd, NULL);
+ grpc_fd_orphan(em_fd, NULL, "d");
destroy_change_data(&a);
destroy_change_data(&b);
close(sv[1]);