From 18b49ab914ea5a57f22ed6d77520cd7d4372749b Mon Sep 17 00:00:00 2001 From: ctiller Date: Tue, 9 Dec 2014 14:39:16 -0800 Subject: Introducing iomgr. Move eventmanager and platform dependent endpoint functionality into a single library called 'iomgr'. This is primarily to prepare for a Windows port - where posix socket semantics lead to poor quality code. Mostly this is a code movement CL, with some small changes to help prepare the way for porting: - em style fd objects can only be held internally in iomgr, and own their memory - added grpc_iomgr_create_endpoint_pair() to accomodate the common pattern of creating a tcp endpoint from the output of socketpair - this will help keep our tests portable - separated em alarm interface into a separate file, as this part of event manager is needed higher up the stack - made the eventmanager bits a true singleton, simplifying API's across the stack as there's no longer a reason to carry a pointer there. Initial design document is here: https://docs.google.com/document/d/1VmafcHvvrP5kwtQkz84R5yXF7u7fW-9Pn0bkSUQHDt8/edit?disco=AAAAARNByxg Change on 2014/12/09 by ctiller ------------- Created by MOE: http://code.google.com/p/moe-java MOE_MIGRATED_REVID=81716456 --- test/core/surface/completion_queue_test.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test/core/surface') diff --git a/test/core/surface/completion_queue_test.c b/test/core/surface/completion_queue_test.c index 6df159f697..77decdacea 100644 --- a/test/core/surface/completion_queue_test.c +++ b/test/core/surface/completion_queue_test.c @@ -33,12 +33,12 @@ #include "src/core/surface/completion_queue.h" +#include "src/core/iomgr/iomgr.h" #include #include #include #include #include -#include "src/core/surface/surface_em.h" #include "test/core/util/test_config.h" #define LOG_TEST() gpr_log(GPR_INFO, "%s", __FUNCTION__) @@ -417,7 +417,7 @@ static void test_threading(int producers, int consumers) { int main(int argc, char **argv) { grpc_test_init(argc, argv); - grpc_surface_em_init(); + grpc_iomgr_init(); test_no_op(); test_wait_empty(); test_cq_end_read(); @@ -430,6 +430,6 @@ int main(int argc, char **argv) { test_threading(1, 10); test_threading(10, 1); test_threading(10, 10); - grpc_surface_em_shutdown(); + grpc_iomgr_shutdown(); return 0; } -- cgit v1.2.3