/third_party/grpc/src/core/lib/surface/ |
D | completion_queue.cc | 202 void (*shutdown)(grpc_completion_queue* cq); 204 bool (*begin_op)(grpc_completion_queue* cq, void* tag); 205 void (*end_op)(grpc_completion_queue* cq, void* tag, grpc_error* error, 208 grpc_event (*next)(grpc_completion_queue* cq, gpr_timespec deadline, 210 grpc_event (*pluck)(grpc_completion_queue* cq, void* tag, 361 static void cq_finish_shutdown_next(grpc_completion_queue* cq); 362 static void cq_finish_shutdown_pluck(grpc_completion_queue* cq); 363 static void cq_finish_shutdown_callback(grpc_completion_queue* cq); 364 static void cq_shutdown_next(grpc_completion_queue* cq); 365 static void cq_shutdown_pluck(grpc_completion_queue* cq); [all …]
|
D | completion_queue.h | 54 void grpc_cq_internal_ref(grpc_completion_queue* cq, const char* reason, 56 void grpc_cq_internal_unref(grpc_completion_queue* cq, const char* reason, 58 #define GRPC_CQ_INTERNAL_REF(cq, reason) \ argument 59 grpc_cq_internal_ref(cq, reason, __FILE__, __LINE__) 60 #define GRPC_CQ_INTERNAL_UNREF(cq, reason) \ argument 61 grpc_cq_internal_unref(cq, reason, __FILE__, __LINE__) 63 void grpc_cq_internal_ref(grpc_completion_queue* cq); 64 void grpc_cq_internal_unref(grpc_completion_queue* cq); 65 #define GRPC_CQ_INTERNAL_REF(cq, reason) grpc_cq_internal_ref(cq) argument 66 #define GRPC_CQ_INTERNAL_UNREF(cq, reason) grpc_cq_internal_unref(cq) argument [all …]
|
D | channel_ping.cc | 34 grpc_completion_queue* cq; member 43 grpc_cq_end_op(pr->cq, pr->tag, GRPC_ERROR_REF(error), ping_destroy, pr, in ping_done() 47 void grpc_channel_ping(grpc_channel* channel, grpc_completion_queue* cq, in grpc_channel_ping() argument 50 (channel, cq, tag, reserved)); in grpc_channel_ping() 58 pr->cq = cq; in grpc_channel_ping() 61 op->bind_pollset = grpc_cq_pollset(cq); in grpc_channel_ping() 62 GPR_ASSERT(grpc_cq_begin_op(cq, tag)); in grpc_channel_ping()
|
/third_party/grpc/test/core/surface/ |
D | num_external_connectivity_watchers_test.cc | 43 grpc_completion_queue* cq) { in channel_idle_start_watch() argument 49 channel, GRPC_CHANNEL_IDLE, connect_deadline, cq, (void*)(next_tag++)); in channel_idle_start_watch() 55 grpc_completion_queue* cq) { in channel_idle_poll_for_timeout() argument 57 cq, gpr_inf_future(GPR_CLOCK_REALTIME), nullptr); in channel_idle_poll_for_timeout() 77 grpc_completion_queue* cq = grpc_completion_queue_create_for_next(nullptr); in run_timeouts_test() local 80 channel_idle_start_watch(channel, cq); in run_timeouts_test() 81 channel_idle_poll_for_timeout(channel, cq); in run_timeouts_test() 86 channel_idle_start_watch(channel, cq); in run_timeouts_test() 89 channel_idle_poll_for_timeout(channel, cq); in run_timeouts_test() 96 channel_idle_start_watch(channel, cq); in run_timeouts_test() [all …]
|
D | server_test.cc | 84 grpc_completion_queue* cq = grpc_completion_queue_create_for_next(nullptr); in test_bind_server_twice() local 87 grpc_server_register_completion_queue(server1, cq, nullptr); in test_bind_server_twice() 88 grpc_server_register_completion_queue(server2, cq, nullptr); in test_bind_server_twice() 99 grpc_server_shutdown_and_notify(server1, cq, nullptr); in test_bind_server_twice() 100 grpc_server_shutdown_and_notify(server2, cq, nullptr); in test_bind_server_twice() 101 grpc_completion_queue_next(cq, gpr_inf_future(GPR_CLOCK_MONOTONIC), nullptr); in test_bind_server_twice() 102 grpc_completion_queue_next(cq, gpr_inf_future(GPR_CLOCK_MONOTONIC), nullptr); in test_bind_server_twice() 105 grpc_completion_queue_destroy(cq); in test_bind_server_twice() 124 grpc_completion_queue* cq = grpc_completion_queue_create_for_next(nullptr); in test_bind_server_to_addr() local 125 grpc_server_register_completion_queue(server, cq, nullptr); in test_bind_server_to_addr() [all …]
|
/third_party/grpc/test/cpp/common/ |
D | alarm_test.cc | 35 CompletionQueue cq; in TEST() local 38 alarm.Set(&cq, grpc_timeout_seconds_to_deadline(1), junk); in TEST() 43 cq.AsyncNext(&output_tag, &ok, grpc_timeout_seconds_to_deadline(10)); in TEST() 51 CompletionQueue cq; in TEST() local 56 alarm.Set(&cq, grpc_timeout_seconds_to_deadline(1), junk); in TEST() 61 cq.AsyncNext(&output_tag, &ok, grpc_timeout_seconds_to_deadline(10)); in TEST() 74 CompletionQueue cq; in TEST() local 75 alarm.Set(&cq, grpc_timeout_seconds_to_deadline(1), junk); in TEST() 80 cq.AsyncNext(&output_tag, &ok, grpc_timeout_seconds_to_deadline(10)); in TEST() 149 CompletionQueue cq; in TEST() local [all …]
|
/third_party/grpc/test/core/end2end/tests/ |
D | connectivity.cc | 33 grpc_completion_queue* cq; member 52 ev = grpc_completion_queue_next(ce->cq, gpr_inf_future(GPR_CLOCK_MONOTONIC), in child_thread() 62 cq_verifier* cqv = cq_verifier_create(f.cq); in test_connectivity() 77 ce.cq = f.cq; in test_connectivity() 94 f.client, GRPC_CHANNEL_IDLE, gpr_now(GPR_CLOCK_MONOTONIC), f.cq, tag(1)); in test_connectivity() 105 f.cq, tag(2)); in test_connectivity() 117 f.cq, tag(3)); in test_connectivity() 135 f.client, state, grpc_timeout_seconds_to_deadline(3), f.cq, tag(4)); in test_connectivity() 150 f.cq, tag(5)); in test_connectivity() 152 grpc_server_shutdown_and_notify(f.server, f.cq, tag(0xdead)); in test_connectivity() [all …]
|
D | shutdown_finishes_tags.cc | 52 static void drain_cq(grpc_completion_queue* cq) { in drain_cq() argument 55 ev = grpc_completion_queue_next(cq, five_seconds_from_now(), nullptr); in drain_cq() 68 grpc_completion_queue_shutdown(f->cq); in end_test() 69 drain_cq(f->cq); in end_test() 70 grpc_completion_queue_destroy(f->cq); in end_test() 79 cq_verifier* cqv = cq_verifier_create(f.cq); in test_early_server_shutdown_finishes_tags() 91 &request_metadata_recv, f.cq, f.cq, tag(101))); in test_early_server_shutdown_finishes_tags() 92 grpc_server_shutdown_and_notify(f.server, f.cq, tag(1000)); in test_early_server_shutdown_finishes_tags()
|
/third_party/grpc/src/csharp/Grpc.Core/Internal/ |
D | CompletionQueueSafeHandle.cs | 52 var cq = Native.grpcsharp_completion_queue_create_async(); in CreateAsync() 53 cq.completionRegistry = completionRegistry; in CreateAsync() 54 cq.shutdownRefcount = new AtomicCounter(1); in CreateAsync() 55 return cq; in CreateAsync() 123 readonly CompletionQueueSafeHandle cq; field 125 public UsageScope(CompletionQueueSafeHandle cq) in UsageScope() 127 this.cq = cq; in UsageScope() 128 this.cq.BeginOp(); in UsageScope() 133 cq.EndOp(); in Dispose()
|
/third_party/grpc/test/cpp/qps/ |
D | client_async.cc | 53 virtual void StartNewClone(CompletionQueue* cq) = 0; 59 virtual void Start(CompletionQueue* cq, const ClientConfig& config) = 0; 85 void Start(CompletionQueue* cq, const ClientConfig& config) override { in Start() argument 87 StartInternal(cq); in Start() 111 void StartNewClone(CompletionQueue* cq) override { in StartNewClone() argument 114 clone->StartInternal(cq); in StartNewClone() 138 void StartInternal(CompletionQueue* cq) { in StartInternal() argument 139 cq_ = cq; in StartInternal() 186 auto* cq = cli_cqs_[t].get(); in AsyncClient() local 189 ctx->Start(cq, config); in AsyncClient() [all …]
|
/third_party/grpc/src/core/tsi/alts/handshaker/ |
D | alts_shared_resource.cc | 36 grpc_completion_queue_next(g_alts_resource_dedicated.cq, in thread_worker() 50 g_alts_resource_dedicated.cq = nullptr; in grpc_alts_shared_resource_dedicated_init() 57 if (g_alts_resource_dedicated.cq == nullptr) { in grpc_alts_shared_resource_dedicated_start() 60 g_alts_resource_dedicated.cq = in grpc_alts_shared_resource_dedicated_start() 66 grpc_cq_pollset(g_alts_resource_dedicated.cq)); in grpc_alts_shared_resource_dedicated_start() 73 if (g_alts_resource_dedicated.cq != nullptr) { in grpc_alts_shared_resource_dedicated_shutdown() 75 grpc_cq_pollset(g_alts_resource_dedicated.cq)); in grpc_alts_shared_resource_dedicated_shutdown() 76 grpc_completion_queue_shutdown(g_alts_resource_dedicated.cq); in grpc_alts_shared_resource_dedicated_shutdown() 79 grpc_completion_queue_destroy(g_alts_resource_dedicated.cq); in grpc_alts_shared_resource_dedicated_shutdown()
|
/third_party/grpc/src/cpp/client/ |
D | channel_cc.cc | 106 ::grpc::CompletionQueue* cq, size_t interceptor_pos) { in CreateCallInternal() argument 112 context->propagation_options_.c_bitmask(), cq->cq(), in CreateCallInternal() 129 context->propagation_options_.c_bitmask(), cq->cq(), method_slice, in CreateCallInternal() 147 return ::grpc::internal::Call(c_call, this, cq, info); in CreateCallInternal() 152 CompletionQueue* cq) { in CreateCall() argument 153 return CreateCallInternal(method, context, cq, 0); in CreateCall() 191 ::grpc::CompletionQueue* cq, void* tag) { in NotifyOnStateChangeImpl() argument 194 cq->cq(), tag_saver); in NotifyOnStateChangeImpl() 199 ::grpc::CompletionQueue cq; in WaitForStateChangeImpl() 202 NotifyOnStateChangeImpl(last_observed, deadline, &cq, nullptr); in WaitForStateChangeImpl() [all …]
|
/third_party/grpc/test/cpp/microbenchmarks/ |
D | bm_cq.cc | 39 CompletionQueue cq; in BM_CreateDestroyCpp() local 51 CompletionQueue cq(core_cq); in BM_CreateDestroyCpp2() local 86 CompletionQueue cq; in BM_Pass1Cpp() local 87 grpc_completion_queue* c_cq = cq.cq(); in BM_Pass1Cpp() 98 cq.Next(&tag, &ok); in BM_Pass1Cpp() 107 grpc_completion_queue* cq = grpc_completion_queue_create_for_next(nullptr); in BM_Pass1Core() local 112 GPR_ASSERT(grpc_cq_begin_op(cq, nullptr)); in BM_Pass1Core() 113 grpc_cq_end_op(cq, nullptr, GRPC_ERROR_NONE, DoneWithCompletionOnStack, in BM_Pass1Core() 116 grpc_completion_queue_next(cq, deadline, nullptr); in BM_Pass1Core() 118 grpc_completion_queue_destroy(cq); in BM_Pass1Core() [all …]
|
D | fullstack_streaming_pump.h | 53 service.RequestBidiStream(&svr_ctx, &response_rw, fixture->cq(), in BM_PumpStreamClientToServer() 54 fixture->cq(), tag(0)); in BM_PumpStreamClientToServer() 58 auto request_rw = stub->AsyncBidiStream(&cli_ctx, fixture->cq(), tag(1)); in BM_PumpStreamClientToServer() 63 GPR_ASSERT(fixture->cq()->Next(&t, &ok)); in BM_PumpStreamClientToServer() 74 GPR_ASSERT(fixture->cq()->Next(&t, &ok)); in BM_PumpStreamClientToServer() 87 GPR_ASSERT(fixture->cq()->Next(&t, &ok)); in BM_PumpStreamClientToServer() 97 GPR_ASSERT(fixture->cq()->Next(&t, &ok)); in BM_PumpStreamClientToServer() 122 service.RequestBidiStream(&svr_ctx, &response_rw, fixture->cq(), in BM_PumpStreamServerToClient() 123 fixture->cq(), tag(0)); in BM_PumpStreamServerToClient() 127 auto request_rw = stub->AsyncBidiStream(&cli_ctx, fixture->cq(), tag(1)); in BM_PumpStreamServerToClient() [all …]
|
D | fullstack_streaming_ping_pong.h | 72 service.RequestBidiStream(&svr_ctx, &response_rw, fixture->cq(), in BM_StreamingPingPong() 73 fixture->cq(), tag(0)); in BM_StreamingPingPong() 77 auto request_rw = stub->AsyncBidiStream(&cli_ctx, fixture->cq(), tag(1)); in BM_StreamingPingPong() 84 GPR_ASSERT(fixture->cq()->Next(&t, &ok)); in BM_StreamingPingPong() 100 GPR_ASSERT(fixture->cq()->Next(&t, &ok)); in BM_StreamingPingPong() 124 GPR_ASSERT(fixture->cq()->Next(&t, &ok)); in BM_StreamingPingPong() 164 service.RequestBidiStream(&svr_ctx, &response_rw, fixture->cq(), in BM_StreamingPingPongMsgs() 165 fixture->cq(), tag(0)); in BM_StreamingPingPongMsgs() 169 auto request_rw = stub->AsyncBidiStream(&cli_ctx, fixture->cq(), tag(1)); in BM_StreamingPingPongMsgs() 176 GPR_ASSERT(fixture->cq()->Next(&t, &ok)); in BM_StreamingPingPongMsgs() [all …]
|
D | fullstack_unary_ping_pong.h | 67 &server_env[0]->response_writer, fixture->cq(), in BM_UnaryPingPong() 68 fixture->cq(), tag(0)); in BM_UnaryPingPong() 70 &server_env[1]->response_writer, fixture->cq(), in BM_UnaryPingPong() 71 fixture->cq(), tag(1)); in BM_UnaryPingPong() 80 stub->AsyncEcho(&cli_ctx, send_request, fixture->cq())); in BM_UnaryPingPong() 84 GPR_ASSERT(fixture->cq()->Next(&t, &ok)); in BM_UnaryPingPong() 92 GPR_ASSERT(fixture->cq()->Next(&t, &ok)); in BM_UnaryPingPong() 103 fixture->cq(), fixture->cq(), tag(slot)); in BM_UnaryPingPong()
|
/third_party/grpc/test/core/transport/chttp2/ |
D | too_many_pings_test.cc | 62 grpc_completion_queue* cq) { in PerformCall() argument 65 cq_verifier* cqv = cq_verifier_create(cq); in PerformCall() 77 c = grpc_channel_create_call(channel, nullptr, GRPC_PROPAGATE_DEFAULTS, cq, in PerformCall() 104 &request_metadata_recv, cq, cq, tag(101)); in PerformCall() 127 grpc_completion_queue* cq = grpc_completion_queue_create_for_next(nullptr); in TEST() local 132 grpc_server_register_completion_queue(server, cq, nullptr); in TEST() 147 grpc_status_code status = PerformCall(channel, server, cq); in TEST() 168 grpc_server_shutdown_and_notify(server, cq, nullptr); in TEST() 169 grpc_completion_queue_shutdown(cq); in TEST() 170 while (grpc_completion_queue_next(cq, gpr_inf_future(GPR_CLOCK_REALTIME), in TEST() [all …]
|
/third_party/grpc/test/core/end2end/ |
D | h2_ssl_session_reuse_test.cc | 51 grpc_server* server_create(grpc_completion_queue* cq, const char* server_addr) { in server_create() argument 71 grpc_server_register_completion_queue(server, cq, nullptr); in server_create() 129 void do_round_trip(grpc_completion_queue* cq, grpc_server* server, in do_round_trip() argument 134 cq_verifier* cqv = cq_verifier_create(cq); in do_round_trip() 148 client, nullptr, GRPC_PROPAGATE_DEFAULTS, cq, in do_round_trip() 186 &request_metadata_recv, cq, cq, tag(101)); in do_round_trip() 243 void drain_cq(grpc_completion_queue* cq) { in drain_cq() argument 246 ev = grpc_completion_queue_next(cq, five_seconds_time(), nullptr); in drain_cq() 255 grpc_completion_queue* cq = grpc_completion_queue_create_for_next(nullptr); in TEST() local 258 grpc_server* server = server_create(cq, server_addr.c_str()); in TEST() [all …]
|
/third_party/grpc/test/core/end2end/fuzzers/ |
D | server_fuzzer.cc | 54 grpc_completion_queue* cq = grpc_completion_queue_create_for_next(nullptr); in LLVMFuzzerTestOneInput() local 55 grpc_server_register_completion_queue(server, cq, nullptr); in LLVMFuzzerTestOneInput() 73 &request_metadata1, cq, cq, tag(1))); in LLVMFuzzerTestOneInput() 79 ev = grpc_completion_queue_next(cq, gpr_inf_past(GPR_CLOCK_REALTIME), in LLVMFuzzerTestOneInput() 100 grpc_server_shutdown_and_notify(server, cq, tag(0xdead)); in LLVMFuzzerTestOneInput() 114 ev = grpc_completion_queue_next(cq, gpr_inf_past(GPR_CLOCK_REALTIME), in LLVMFuzzerTestOneInput() 121 grpc_completion_queue_shutdown(cq); in LLVMFuzzerTestOneInput() 124 ev = grpc_completion_queue_next(cq, gpr_inf_past(GPR_CLOCK_REALTIME), in LLVMFuzzerTestOneInput() 132 grpc_completion_queue_destroy(cq); in LLVMFuzzerTestOneInput()
|
/third_party/grpc/src/csharp/Grpc.Core/ |
D | Server.cs | 79 foreach (var cq in environment.CompletionQueues) in Server() 81 this.handle.RegisterCompletionQueue(cq); in Server() 160 foreach (var cq in environment.CompletionQueues) in Start() 162 AllowOneRpc(cq); in Start() 227 var cq = environment.CompletionQueues.First(); // any cq will do in ShutdownInternalAsync() 228 handle.ShutdownAndNotify(HandleServerShutdown, cq); in ShutdownInternalAsync() 307 private void AllowOneRpc(CompletionQueueSafeHandle cq) in AllowOneRpc() argument 312 handle.RequestCall((success, ctx) => HandleNewServerRpc(success, ctx, cq), cq); in AllowOneRpc() 345 …private async Task HandleCallAsync(ServerRpcNew newRpc, CompletionQueueSafeHandle cq, Action<Serve… in HandleCallAsync() argument 354 await callHandler.HandleCall(newRpc, cq).ConfigureAwait(false); in HandleCallAsync() [all …]
|
/third_party/grpc/test/cpp/end2end/ |
D | hybrid_end2end_test.cc | 54 bool VerifyReturnSuccess(CompletionQueue* cq, int i) { in VerifyReturnSuccess() argument 57 EXPECT_TRUE(cq->Next(&got_tag, &ok)); in VerifyReturnSuccess() 62 void Verify(CompletionQueue* cq, int i, bool expect_ok) { in Verify() argument 63 EXPECT_EQ(expect_ok, VerifyReturnSuccess(cq, i)); in Verify() 68 void HandleEcho(Service* service, ServerCompletionQueue* cq, bool dup_service) { in HandleEcho() argument 73 service->RequestEcho(&srv_ctx, &recv_request, &response_writer, cq, cq, in HandleEcho() 75 Verify(cq, 1, true); in HandleEcho() 81 Verify(cq, 2, true); in HandleEcho() 88 void HandleRawEcho(Service* service, ServerCompletionQueue* cq, in HandleRawEcho() argument 93 service->RequestEcho(&srv_ctx, &recv_buffer, &response_writer, cq, cq, in HandleRawEcho() [all …]
|
/third_party/flatbuffers/tests/ |
D | monster_test.grpc.fb.h | 39 …ontext* context, const flatbuffers::grpc::Message<Monster>& request, ::grpc::CompletionQueue* cq) { in AsyncStore() argument 40 …ncResponseReaderInterface< flatbuffers::grpc::Message<Stat>>>(AsyncStoreRaw(context, request, cq)); in AsyncStore() 42 …ontext* context, const flatbuffers::grpc::Message<Monster>& request, ::grpc::CompletionQueue* cq) { in PrepareAsyncStore() argument 43 …nseReaderInterface< flatbuffers::grpc::Message<Stat>>>(PrepareAsyncStoreRaw(context, request, cq)); in PrepareAsyncStore() 48 …context, const flatbuffers::grpc::Message<Stat>& request, ::grpc::CompletionQueue* cq, void* tag) { in AsyncRetrieve() argument 49 …eaderInterface< flatbuffers::grpc::Message<Monster>>>(AsyncRetrieveRaw(context, request, cq, tag)); in AsyncRetrieve() 51 …ntContext* context, const flatbuffers::grpc::Message<Stat>& request, ::grpc::CompletionQueue* cq) { in PrepareAsyncRetrieve() argument 52 …derInterface< flatbuffers::grpc::Message<Monster>>>(PrepareAsyncRetrieveRaw(context, request, cq)); in PrepareAsyncRetrieve() 57 …ext* context, flatbuffers::grpc::Message<Stat>* response, ::grpc::CompletionQueue* cq, void* tag) { in AsyncGetMaxHitPoint() argument 58 …terface< flatbuffers::grpc::Message<Monster>>>(AsyncGetMaxHitPointRaw(context, response, cq, tag)); in AsyncGetMaxHitPoint() [all …]
|
/third_party/grpc/src/cpp/common/ |
D | alarm.cc | 50 void Set(::grpc::CompletionQueue* cq, gpr_timespec deadline, void* tag) { in Set() argument 53 GRPC_CQ_INTERNAL_REF(cq->cq(), "alarm"); in Set() 54 cq_ = cq->cq(); in Set() 65 grpc_completion_queue* cq = alarm->cq_; in Set() local 68 cq, alarm, error, in Set() 71 GRPC_CQ_INTERNAL_UNREF(cq, "alarm"); in Set() 135 void Alarm::SetInternal(::grpc::CompletionQueue* cq, gpr_timespec deadline, in SetInternal() argument 142 static_cast<internal::AlarmImpl*>(alarm_)->Set(cq, deadline, tag); in SetInternal()
|
/third_party/grpc/src/csharp/Grpc.Core.Tests/Internal/ |
D | CompletionQueueSafeHandleTest.cs | 34 var cq = CompletionQueueSafeHandle.CreateSync(); in CreateSyncAndDestroy() 35 cq.Dispose(); in CreateSyncAndDestroy() 43 …var cq = CompletionQueueSafeHandle.CreateAsync(new CompletionRegistry(env, () => BatchContextSafeH… in CreateAsyncAndShutdown() 44 cq.Shutdown(); in CreateAsyncAndShutdown() 45 var ev = cq.Next(); in CreateAsyncAndShutdown() 46 cq.Dispose(); in CreateAsyncAndShutdown()
|
/third_party/grpc/include/grpcpp/impl/codegen/ |
D | call.h | 43 Call(grpc_call* call, CallHook* call_hook, ::grpc::CompletionQueue* cq) in Call() argument 45 cq_(cq), in Call() 49 Call(grpc_call* call, CallHook* call_hook, ::grpc::CompletionQueue* cq, in Call() argument 52 cq_(cq), in Call() 57 Call(grpc_call* call, CallHook* call_hook, ::grpc::CompletionQueue* cq, in Call() argument 60 cq_(cq), in Call() 70 ::grpc::CompletionQueue* cq() const { return cq_; } in cq() function
|