<p>I can confirm that kamailio works perfectly without PTHREAD_MUTEX:</p>
<pre><code>  Version: kamailio 4.4.5 (x86_64/freebsd) f98162
  Default config: /usr/local/etc/kamailio/kamailio.cfg
  Default paths to modules: /usr/local/lib/kamailio/modules
  Compile flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
  MAX_RECV_BUFFER_SIZE=262144
  MAX_LISTEN=16
  MAX_URI_SIZE=1024
  BUF_SIZE=65535
  DEFAULT PKG_SIZE=8MB
  DEFAULT SHM_SIZE=64MB
  ADAPTIVE_WAIT_LOOPS=1024
  TCP poll methods: poll, select, kqueue
  Source code revision ID: f98162
  Compiled with: clang 3.4
  Compiled on: 12:45:18 Mar 15 2017
</code></pre>
<p>I've found diff between build from src and using ports framework - it's target arch:<br>
when it builds from src <strong>make cfg</strong> shows:<br>
<code>target architecture <x86_64>, host architecture <x86_64></code></p>
<p>when it builds from ports it shows:<br>
<code>target architecture <amd64>, host architecture <x86_64></code></p>
<p>In last case Makefile.defs did know nothing about arch amd64 and that's why use_fast_lock hasn't set to yes and that's why PTHREAD_MUTEX was used.</p>
<p>But it is another story, where I and <strong>opsec</strong> will try to do something this it.</p>
<p>Daniel, thanks for your help and patience!</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you commented.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/1021#issuecomment-286705117">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AF36ZRhtv_wdAG-7M3ihxZcGbwq1m1aAks5rl8DAgaJpZM4MVTh1">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AF36ZTITcl-tX6KYGO84XWxx7kRmOLvhks5rl8DAgaJpZM4MVTh1.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/1021#issuecomment-286705117"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/kamailio/kamailio","title":"kamailio/kamailio","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/kamailio/kamailio"}},"updates":{"snippets":[{"icon":"PERSON","message":"@subnetsRU in #1021: I can confirm that kamailio works perfectly without PTHREAD_MUTEX:\r\n```\r\n  Version: kamailio 4.4.5 (x86_64/freebsd) f98162\r\n  Default config: /usr/local/etc/kamailio/kamailio.cfg\r\n  Default paths to modules: /usr/local/lib/kamailio/modules\r\n  Compile flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES\r\n  MAX_RECV_BUFFER_SIZE=262144\r\n  MAX_LISTEN=16\r\n  MAX_URI_SIZE=1024\r\n  BUF_SIZE=65535\r\n  DEFAULT PKG_SIZE=8MB\r\n  DEFAULT SHM_SIZE=64MB\r\n  ADAPTIVE_WAIT_LOOPS=1024\r\n  TCP poll methods: poll, select, kqueue\r\n  Source code revision ID: f98162\r\n  Compiled with: clang 3.4\r\n  Compiled on: 12:45:18 Mar 15 2017\r\n```\r\nI've found diff between build from src and using ports framework - it's target arch:\r\nwhen it builds from src **make cfg** shows:\r\n`target architecture \u003cx86_64\u003e, host architecture \u003cx86_64\u003e`\r\n\r\nwhen it builds from ports it shows:\r\n`target architecture \u003camd64\u003e, host architecture \u003cx86_64\u003e`\r\n\r\nIn last case Makefile.defs did know nothing about arch amd64 and that's why use_fast_lock hasn't set to yes and that's why PTHREAD_MUTEX was used.\r\n\r\nBut it is another story, where I and **opsec** will try to do something this it.\r\n\r\nDaniel, thanks for your help and patience!"}],"action":{"name":"View Issue","url":"https://github.com/kamailio/kamailio/issues/1021#issuecomment-286705117"}}}</script>