| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/><meta http-equiv="X-UA-Compatible" content="IE=9"/><meta name="generator" content="Doxygen 1.8.17"/><meta name="viewport" content="width=device-width, initial-scale=1"/><title>GRPC Core: include/grpc/support/cpu.h File Reference</title><link href="tabs.css" rel="stylesheet" type="text/css"/><script type="text/javascript" src="jquery.js"></script><script type="text/javascript" src="dynsections.js"></script><link href="search/search.css" rel="stylesheet" type="text/css"/><script type="text/javascript" src="search/searchdata.js"></script><script type="text/javascript" src="search/search.js"></script><link href="doxygen.css" rel="stylesheet" type="text/css" /></head><body><div id="top"><!-- do not remove this div, it is closed by doxygen! --><div id="titlearea"><table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;">  <td id="projectalign" style="padding-left: 0.5em;">   <div id="projectname">GRPC Core    <span id="projectnumber">14.0.0</span>   </div>  </td> </tr> </tbody></table></div><!-- end header part --><!-- Generated by Doxygen 1.8.17 --><script type="text/javascript">/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */var searchBox = new SearchBox("searchBox", "search",false,'Search');/* @license-end */</script><script type="text/javascript" src="menudata.js"></script><script type="text/javascript" src="menu.js"></script><script type="text/javascript">/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */$(function() {  initMenu('',true,false,'search.php','Search');  $(document).ready(function() { init_search(); });});/* @license-end */</script><div id="main-nav"></div><!-- window showing the filter options --><div id="MSearchSelectWindow"     onmouseover="return searchBox.OnSearchSelectShow()"     onmouseout="return searchBox.OnSearchSelectHide()"     onkeydown="return searchBox.OnSearchSelectKey(event)"></div><!-- iframe showing the search results (closed by default) --><div id="MSearchResultsWindow"><iframe src="javascript:void(0)" frameborder="0"         name="MSearchResults" id="MSearchResults"></iframe></div><div id="nav-path" class="navpath">  <ul><li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_9d7a14d6d9adcbe4c35dbdb88d867e2e.html">grpc</a></li><li class="navelem"><a class="el" href="dir_cad3142e04109052413f2d2a2d1813b0.html">support</a></li>  </ul></div></div><!-- top --><div class="header">  <div class="summary"><a href="#func-members">Functions</a>  </div>  <div class="headertitle"><div class="title">cpu.h File Reference</div>  </div></div><!--header--><div class="contents"><div class="textblock"><code>#include <<a class="el" href="support_2port__platform_8h_source.html">grpc/support/port_platform.h</a>></code><br /></div><p><a href="cpu_8h_source.html">Go to the source code of this file.</a></p><table class="memberdecls"><tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>Functions</h2></td></tr><tr class="memitem:ad02216a0383f381a320c8d183a69bf29"><td class="memItemLeft" align="right" valign="top"><a class="el" href="impl_2codegen_2port__platform_8h.html#af89d3610372fc35178e83e06916aa808">GPRAPI</a> unsigned </td><td class="memItemRight" valign="bottom"><a class="el" href="cpu_8h.html#ad02216a0383f381a320c8d183a69bf29">gpr_cpu_num_cores</a> (void)</td></tr><tr class="memdesc:ad02216a0383f381a320c8d183a69bf29"><td class="mdescLeft"> </td><td class="mdescRight">Interface providing CPU information for currently running system.  <a href="cpu_8h.html#ad02216a0383f381a320c8d183a69bf29">More...</a><br /></td></tr><tr class="separator:ad02216a0383f381a320c8d183a69bf29"><td class="memSeparator" colspan="2"> </td></tr><tr class="memitem:a751e8c9f891e8b36fb7f22cc39c92c15"><td class="memItemLeft" align="right" valign="top"><a class="el" href="impl_2codegen_2port__platform_8h.html#af89d3610372fc35178e83e06916aa808">GPRAPI</a> unsigned </td><td class="memItemRight" valign="bottom"><a class="el" href="cpu_8h.html#a751e8c9f891e8b36fb7f22cc39c92c15">gpr_cpu_current_cpu</a> (void)</td></tr><tr class="memdesc:a751e8c9f891e8b36fb7f22cc39c92c15"><td class="mdescLeft"> </td><td class="mdescRight">Return the CPU on which the current thread is executing; N.B.  <a href="cpu_8h.html#a751e8c9f891e8b36fb7f22cc39c92c15">More...</a><br /></td></tr><tr class="separator:a751e8c9f891e8b36fb7f22cc39c92c15"><td class="memSeparator" colspan="2"> </td></tr></table><h2 class="groupheader">Function Documentation</h2><a id="a751e8c9f891e8b36fb7f22cc39c92c15"></a><h2 class="memtitle"><span class="permalink"><a href="#a751e8c9f891e8b36fb7f22cc39c92c15">◆ </a></span>gpr_cpu_current_cpu()</h2><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname"><a class="el" href="impl_2codegen_2port__platform_8h.html#af89d3610372fc35178e83e06916aa808">GPRAPI</a> unsigned gpr_cpu_current_cpu </td>          <td>(</td>          <td class="paramtype">void </td>          <td class="paramname"></td><td>)</td>          <td></td>        </tr>      </table></div><div class="memdoc"><p>Return the CPU on which the current thread is executing; N.B. </p><p>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, <a class="el" href="cpu_8h.html#ad02216a0383f381a320c8d183a69bf29" title="Interface providing CPU information for currently running system.">gpr_cpu_num_cores()</a> - 1] </p></div></div><a id="ad02216a0383f381a320c8d183a69bf29"></a><h2 class="memtitle"><span class="permalink"><a href="#ad02216a0383f381a320c8d183a69bf29">◆ </a></span>gpr_cpu_num_cores()</h2><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname"><a class="el" href="impl_2codegen_2port__platform_8h.html#af89d3610372fc35178e83e06916aa808">GPRAPI</a> unsigned gpr_cpu_num_cores </td>          <td>(</td>          <td class="paramtype">void </td>          <td class="paramname"></td><td>)</td>          <td></td>        </tr>      </table></div><div class="memdoc"><p>Interface providing CPU information for currently running system. </p><p>Return the number of CPU cores on the current system. Will return 0 if the information is not available. </p></div></div></div><!-- contents --><!-- start footer part --><hr class="footer"/><address class="footer"><small>Generated on Fri Jan 22 2021 01:31:59 for GRPC Core by  <a href="http://www.doxygen.org/index.html"><img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17</small></address></body></html>
 |