Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(274)

Unified Diff: third_party/grpc/include/grpc/support/cpu.h

Issue 1932353002: Initial checkin of gRPC to third_party/ Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/grpc/include/grpc/support/cmdline.h ('k') | third_party/grpc/include/grpc/support/histogram.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/grpc/include/grpc/support/cpu.h
diff --git a/third_party/WebKit/public/platform/WebReferrerPolicy.h b/third_party/grpc/include/grpc/support/cpu.h
similarity index 67%
copy from third_party/WebKit/public/platform/WebReferrerPolicy.h
copy to third_party/grpc/include/grpc/support/cpu.h
index 3e58d49b92e7d9eabe8da9a00f609ef832cd0a17..3ca83b5a0d679437ba22e0883ac4f30a6458448b 100644
--- a/third_party/WebKit/public/platform/WebReferrerPolicy.h
+++ b/third_party/grpc/include/grpc/support/cpu.h
@@ -1,5 +1,7 @@
/*
- * Copyright (C) 2011 Google Inc. All rights reserved.
+ *
+ * Copyright 2015-2016, Google Inc.
+ * All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -26,24 +28,32 @@
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
*/
-#ifndef WebReferrerPolicy_h
-#define WebReferrerPolicy_h
+#ifndef GRPC_SUPPORT_CPU_H
+#define GRPC_SUPPORT_CPU_H
+
+#include <grpc/support/port_platform.h>
-namespace blink {
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Interface providing CPU information for currently running system */
-enum WebReferrerPolicy {
- WebReferrerPolicyAlways,
- WebReferrerPolicyDefault,
- WebReferrerPolicyNoReferrerWhenDowngrade,
- WebReferrerPolicyNever,
- WebReferrerPolicyOrigin,
- WebReferrerPolicyOriginWhenCrossOrigin,
- WebReferrerPolicyNoReferrerWhenDowngradeOriginWhenCrossOrigin,
- WebReferrerPolicyLast = WebReferrerPolicyNoReferrerWhenDowngradeOriginWhenCrossOrigin
-};
+/* Return the number of CPU cores on the current system. Will return 0 if
+ the information is not available. */
+GPRAPI unsigned gpr_cpu_num_cores(void);
-} // namespace blink
+/* Return the CPU on which the current thread is executing; N.B. This should
+ be considered advisory only - it is possible that the thread is switched
+ to a different CPU at any time. Returns a value in range
+ [0, gpr_cpu_num_cores() - 1] */
+GPRAPI unsigned gpr_cpu_current_cpu(void);
+#ifdef __cplusplus
+} // extern "C"
#endif
+
+#endif /* GRPC_SUPPORT_CPU_H */
« no previous file with comments | « third_party/grpc/include/grpc/support/cmdline.h ('k') | third_party/grpc/include/grpc/support/histogram.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698