Removed space from dir name to fix clang_format_code

pull/19703/head^2
Tony Lu 5 years ago
parent b458f3e6a5
commit b82d5ecc5a
  1. 2
      gRPC-Core.podspec
  2. 31
      src/core/lib/gpr/env_linux.cc
  3. 5
      src/core/lib/gpr/env_posix.cc
  4. 8
      src/core/lib/iomgr/combiner.cc
  5. 24
      src/core/lib/surface/completion_queue.cc
  6. 2
      src/core/lib/surface/server.cc
  7. 0
      src/objective-c/examples/watchOS-sample/watchOS-sample-WatchKit-Extension/Assets.xcassets/Complication.complicationset/Circular.imageset/Contents.json
  8. 0
      src/objective-c/examples/watchOS-sample/watchOS-sample-WatchKit-Extension/Assets.xcassets/Complication.complicationset/Contents.json
  9. 0
      src/objective-c/examples/watchOS-sample/watchOS-sample-WatchKit-Extension/Assets.xcassets/Complication.complicationset/Extra Large.imageset/Contents.json
  10. 0
      src/objective-c/examples/watchOS-sample/watchOS-sample-WatchKit-Extension/Assets.xcassets/Complication.complicationset/Graphic Bezel.imageset/Contents.json
  11. 0
      src/objective-c/examples/watchOS-sample/watchOS-sample-WatchKit-Extension/Assets.xcassets/Complication.complicationset/Graphic Circular.imageset/Contents.json
  12. 0
      src/objective-c/examples/watchOS-sample/watchOS-sample-WatchKit-Extension/Assets.xcassets/Complication.complicationset/Graphic Corner.imageset/Contents.json
  13. 0
      src/objective-c/examples/watchOS-sample/watchOS-sample-WatchKit-Extension/Assets.xcassets/Complication.complicationset/Graphic Large Rectangular.imageset/Contents.json
  14. 0
      src/objective-c/examples/watchOS-sample/watchOS-sample-WatchKit-Extension/Assets.xcassets/Complication.complicationset/Modular.imageset/Contents.json
  15. 0
      src/objective-c/examples/watchOS-sample/watchOS-sample-WatchKit-Extension/Assets.xcassets/Complication.complicationset/Utilitarian.imageset/Contents.json
  16. 0
      src/objective-c/examples/watchOS-sample/watchOS-sample-WatchKit-Extension/Assets.xcassets/Contents.json
  17. 0
      src/objective-c/examples/watchOS-sample/watchOS-sample-WatchKit-Extension/ExtensionDelegate.h
  18. 0
      src/objective-c/examples/watchOS-sample/watchOS-sample-WatchKit-Extension/ExtensionDelegate.m
  19. 0
      src/objective-c/examples/watchOS-sample/watchOS-sample-WatchKit-Extension/Info.plist
  20. 0
      src/objective-c/examples/watchOS-sample/watchOS-sample-WatchKit-Extension/InterfaceController.h
  21. 0
      src/objective-c/examples/watchOS-sample/watchOS-sample-WatchKit-Extension/InterfaceController.m
  22. 10
      src/objective-c/examples/watchOS-sample/watchOS-sample.xcodeproj/project.pbxproj
  23. 2
      templates/gRPC-Core.podspec.template
  24. 1
      templates/gRPC-ProtoRPC.podspec.template
  25. 1
      templates/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec.template
  26. 1
      templates/src/objective-c/BoringSSL-GRPC.podspec.template

@ -42,7 +42,7 @@ Pod::Spec.new do |s|
s.osx.deployment_target = '10.9' s.osx.deployment_target = '10.9'
s.tvos.deployment_target = '10.0' s.tvos.deployment_target = '10.0'
s.watchos.deployment_target = '4.0' s.watchos.deployment_target = '4.0'
s.requires_arc = false s.requires_arc = false
name = 'grpc' name = 'grpc'

@ -38,19 +38,20 @@
#include "src/core/lib/gpr/string.h" #include "src/core/lib/gpr/string.h"
#include "src/core/lib/gpr/useful.h" #include "src/core/lib/gpr/useful.h"
static const char* gpr_getenv_silent(const char* name, char** dst) { char* gpr_getenv(const char* name) {
const char* insecure_func_used = nullptr;
char* result = nullptr; char* result = nullptr;
#if defined(GPR_BACKWARDS_COMPATIBILITY_MODE) #if defined(GPR_BACKWARDS_COMPATIBILITY_MODE)
typedef char* (*getenv_type)(const char*); typedef char* (*getenv_type)(const char*);
static getenv_type getenv_func = NULL; static getenv_type getenv_func = nullptr;
/* Check to see which getenv variant is supported (go from most /* Check to see which getenv variant is supported (go from most
* to least secure) */ * to least secure) */
const char* names[] = {"secure_getenv", "__secure_getenv", "getenv"}; if (getenv_func == nullptr) {
for (size_t i = 0; getenv_func == NULL && i < GPR_ARRAY_SIZE(names); i++) { const char* names[] = {"secure_getenv", "__secure_getenv", "getenv"};
getenv_func = (getenv_type)dlsym(RTLD_DEFAULT, names[i]); for (size_t i = 0; i < GPR_ARRAY_SIZE(names); i++) {
if (getenv_func != NULL && strstr(names[i], "secure") == NULL) { getenv_func = (getenv_type)dlsym(RTLD_DEFAULT, names[i]);
insecure_func_used = names[i]; if (getenv_func != nullptr) {
break;
}
} }
} }
result = getenv_func(name); result = getenv_func(name);
@ -58,20 +59,8 @@ static const char* gpr_getenv_silent(const char* name, char** dst) {
result = secure_getenv(name); result = secure_getenv(name);
#else #else
result = getenv(name); result = getenv(name);
insecure_func_used = "getenv";
#endif #endif
*dst = result == nullptr ? result : gpr_strdup(result); return result == nullptr ? result : gpr_strdup(result);
return insecure_func_used;
}
char* gpr_getenv(const char* name) {
char* result = nullptr;
const char* insecure_func_used = gpr_getenv_silent(name, &result);
if (insecure_func_used != nullptr) {
gpr_log(GPR_DEBUG, "Warning: insecure environment read function '%s' used",
insecure_func_used);
}
return result;
} }
void gpr_setenv(const char* name, const char* value) { void gpr_setenv(const char* name, const char* value) {

@ -29,11 +29,6 @@
#include <grpc/support/string_util.h> #include <grpc/support/string_util.h>
#include "src/core/lib/gpr/string.h" #include "src/core/lib/gpr/string.h"
const char* gpr_getenv_silent(const char* name, char** dst) {
*dst = gpr_getenv(name);
return nullptr;
}
char* gpr_getenv(const char* name) { char* gpr_getenv(const char* name) {
char* result = getenv(name); char* result = getenv(name);
return result == nullptr ? result : gpr_strdup(result); return result == nullptr ? result : gpr_strdup(result);

@ -233,11 +233,11 @@ bool grpc_combiner_continue_exec_ctx() {
// offload only if all the following conditions are true: // offload only if all the following conditions are true:
// 1. the combiner is contended and has more than one closure to execute // 1. the combiner is contended and has more than one closure to execute
// 2. the current execution context needs to finish as soon as possible // 2. the current execution context needs to finish as soon as possible
// 3. the DEFAULT executor is threaded // 3. the current thread is not a worker for any background poller
// 4. the current thread is not a worker for any background poller // 4. the DEFAULT executor is threaded
if (contended && grpc_core::ExecCtx::Get()->IsReadyToFinish() && if (contended && grpc_core::ExecCtx::Get()->IsReadyToFinish() &&
grpc_core::Executor::IsThreadedDefault() && !grpc_iomgr_is_any_background_poller_thread() &&
!grpc_iomgr_is_any_background_poller_thread()) { grpc_core::Executor::IsThreadedDefault()) {
GPR_TIMER_MARK("offload_from_finished_exec_ctx", 0); GPR_TIMER_MARK("offload_from_finished_exec_ctx", 0);
// this execution context wants to move on: schedule remaining work to be // this execution context wants to move on: schedule remaining work to be
// picked up on the executor // picked up on the executor

@ -857,17 +857,20 @@ static void cq_end_op_for_callback(
} }
auto* functor = static_cast<grpc_experimental_completion_queue_functor*>(tag); auto* functor = static_cast<grpc_experimental_completion_queue_functor*>(tag);
if (internal) { if (internal || grpc_iomgr_is_any_background_poller_thread()) {
grpc_core::ApplicationCallbackExecCtx::Enqueue(functor, grpc_core::ApplicationCallbackExecCtx::Enqueue(functor,
(error == GRPC_ERROR_NONE)); (error == GRPC_ERROR_NONE));
GRPC_ERROR_UNREF(error); GRPC_ERROR_UNREF(error);
} else { return;
GRPC_CLOSURE_SCHED(
GRPC_CLOSURE_CREATE(
functor_callback, functor,
grpc_core::Executor::Scheduler(grpc_core::ExecutorJobType::SHORT)),
error);
} }
// Schedule the callback on a closure if not internal or triggered
// from a background poller thread.
GRPC_CLOSURE_SCHED(
GRPC_CLOSURE_CREATE(
functor_callback, functor,
grpc_core::Executor::Scheduler(grpc_core::ExecutorJobType::SHORT)),
error);
} }
void grpc_cq_end_op(grpc_completion_queue* cq, void* tag, grpc_error* error, void grpc_cq_end_op(grpc_completion_queue* cq, void* tag, grpc_error* error,
@ -1352,6 +1355,13 @@ static void cq_finish_shutdown_callback(grpc_completion_queue* cq) {
GPR_ASSERT(cqd->shutdown_called); GPR_ASSERT(cqd->shutdown_called);
cq->poller_vtable->shutdown(POLLSET_FROM_CQ(cq), &cq->pollset_shutdown_done); cq->poller_vtable->shutdown(POLLSET_FROM_CQ(cq), &cq->pollset_shutdown_done);
if (grpc_iomgr_is_any_background_poller_thread()) {
grpc_core::ApplicationCallbackExecCtx::Enqueue(callback, true);
return;
}
// Schedule the callback on a closure if not internal or triggered
// from a background poller thread.
GRPC_CLOSURE_SCHED( GRPC_CLOSURE_SCHED(
GRPC_CLOSURE_CREATE( GRPC_CLOSURE_CREATE(
functor_callback, callback, functor_callback, callback,

@ -711,8 +711,10 @@ static void maybe_finish_shutdown(grpc_server* server) {
return; return;
} }
gpr_mu_lock(&server->mu_call);
kill_pending_work_locked( kill_pending_work_locked(
server, GRPC_ERROR_CREATE_FROM_STATIC_STRING("Server Shutdown")); server, GRPC_ERROR_CREATE_FROM_STATIC_STRING("Server Shutdown"));
gpr_mu_unlock(&server->mu_call);
if (server->root_channel_data.next != &server->root_channel_data || if (server->root_channel_data.next != &server->root_channel_data ||
server->listeners_destroyed < num_listeners(server)) { server->listeners_destroyed < num_listeners(server)) {

@ -148,7 +148,7 @@
children = ( children = (
ABB17D5622D93BAB00C26D6E /* watchOS-sample */, ABB17D5622D93BAB00C26D6E /* watchOS-sample */,
ABB17D6E22D93BAC00C26D6E /* watchOS-sample WatchKit App */, ABB17D6E22D93BAC00C26D6E /* watchOS-sample WatchKit App */,
ABB17D7D22D93BAC00C26D6E /* watchOS-sample WatchKit Extension */, ABB17D7D22D93BAC00C26D6E /* watchOS-sample-WatchKit-Extension */,
ABB17D5522D93BAB00C26D6E /* Products */, ABB17D5522D93BAB00C26D6E /* Products */,
2C4A0708747AAA7298F757DA /* Pods */, 2C4A0708747AAA7298F757DA /* Pods */,
589283F4A582EEF2434E0220 /* Frameworks */, 589283F4A582EEF2434E0220 /* Frameworks */,
@ -191,7 +191,7 @@
path = "watchOS-sample WatchKit App"; path = "watchOS-sample WatchKit App";
sourceTree = "<group>"; sourceTree = "<group>";
}; };
ABB17D7D22D93BAC00C26D6E /* watchOS-sample WatchKit Extension */ = { ABB17D7D22D93BAC00C26D6E /* watchOS-sample-WatchKit-Extension */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
ABB17D7E22D93BAC00C26D6E /* InterfaceController.h */, ABB17D7E22D93BAC00C26D6E /* InterfaceController.h */,
@ -201,7 +201,7 @@
ABB17D8422D93BAD00C26D6E /* Assets.xcassets */, ABB17D8422D93BAD00C26D6E /* Assets.xcassets */,
ABB17D8622D93BAD00C26D6E /* Info.plist */, ABB17D8622D93BAD00C26D6E /* Info.plist */,
); );
path = "watchOS-sample WatchKit Extension"; path = "watchOS-sample-WatchKit-Extension";
sourceTree = "<group>"; sourceTree = "<group>";
}; };
/* End PBXGroup section */ /* End PBXGroup section */
@ -598,7 +598,7 @@
ASSETCATALOG_COMPILER_COMPLICATION_NAME = Complication; ASSETCATALOG_COMPILER_COMPLICATION_NAME = Complication;
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 6T98ZJNPG5; DEVELOPMENT_TEAM = 6T98ZJNPG5;
INFOPLIST_FILE = "watchOS-sample WatchKit Extension/Info.plist"; INFOPLIST_FILE = "$(SRCROOT)/watchOS-sample-WatchKit-Extension/Info.plist";
LD_RUNPATH_SEARCH_PATHS = ( LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
@ -620,7 +620,7 @@
ASSETCATALOG_COMPILER_COMPLICATION_NAME = Complication; ASSETCATALOG_COMPILER_COMPLICATION_NAME = Complication;
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 6T98ZJNPG5; DEVELOPMENT_TEAM = 6T98ZJNPG5;
INFOPLIST_FILE = "watchOS-sample WatchKit Extension/Info.plist"; INFOPLIST_FILE = "$(SRCROOT)/watchOS-sample-WatchKit-Extension/Info.plist";
LD_RUNPATH_SEARCH_PATHS = ( LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",

@ -94,7 +94,7 @@
s.ios.deployment_target = '7.0' s.ios.deployment_target = '7.0'
s.osx.deployment_target = '10.9' s.osx.deployment_target = '10.9'
s.tvos.deployment_target = '10.0' s.tvos.deployment_target = '10.0'
s.watchos.deployment_target = '4.0' s.watchos.deployment_target = '4.0'
s.requires_arc = false s.requires_arc = false

@ -38,6 +38,7 @@
s.ios.deployment_target = '7.0' s.ios.deployment_target = '7.0'
s.osx.deployment_target = '10.9' s.osx.deployment_target = '10.9'
s.tvos.deployment_target = '10.0' s.tvos.deployment_target = '10.0'
s.watchos.deployment_target = '4.0'
name = 'ProtoRPC' name = 'ProtoRPC'
s.module_name = name s.module_name = name

@ -108,6 +108,7 @@
s.ios.deployment_target = '7.0' s.ios.deployment_target = '7.0'
s.osx.deployment_target = '10.9' s.osx.deployment_target = '10.9'
s.tvos.deployment_target = '10.0' s.tvos.deployment_target = '10.0'
s.watchos.deployment_target = '4.0'
# Restrict the gRPC runtime version to the one supported by this plugin. # Restrict the gRPC runtime version to the one supported by this plugin.
s.dependency 'gRPC-ProtoRPC', v s.dependency 'gRPC-ProtoRPC', v

@ -87,6 +87,7 @@
s.ios.deployment_target = '7.0' s.ios.deployment_target = '7.0'
s.osx.deployment_target = '10.7' s.osx.deployment_target = '10.7'
s.tvos.deployment_target = '10.0' s.tvos.deployment_target = '10.0'
s.watchos.deployment_target = '4.0'
name = 'openssl_grpc' name = 'openssl_grpc'

Loading…
Cancel
Save