<p>The code was more or less found on various places on the net, here is a link I found searching now:</p>

<ul class="task-list">
<li><a href="http://stackoverflow.com/questions/150355/programmatically-find-the-number-of-cores-on-a-machine">http://stackoverflow.com/questions/150355/programmatically-find-the-number-of-cores-on-a-machine</a></li>
</ul>

<p>It is a bit old, indeed, but shows that bsd was using the same way as mac os x. I didn't have a *BSD at hand to try, though. Maybe the GNU extension with _SC_NPROCESSORS_ONLN got into *BSD, but wonder if the includes are not different, as for Linux.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/kamailio/kamailio/issues/24#issuecomment-69492771">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AF36ZaGUIXrvxcJFzDxwiYkE6JmUsiIeks5ngmNYgaJpZM4DQ3bE.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
  <div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
    <link itemprop="url" href="https://github.com/kamailio/kamailio/issues/24#issuecomment-69492771"></link>
    <meta itemprop="name" content="View Issue"></meta>
  </div>
  <meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>