<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hello,<br>
<br>
<div class="moz-cite-prefix">On 12/3/13 4:20 PM, Sotas Development
wrote:<br>
</div>
<blockquote
cite="mid:CAM0BVXyFG8DP6KYJROFNLV7FG1qrv6m8uh4G__=zVGo6K1qMRQ@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>
<div>
<div>
<div>
<div>
<div>Hi,<br>
<br>
</div>
I want to build a Kamailio version without the usage
of futex. First of all I notice that the variable
"use_futex" within Makefile.defs is hardcoded to the
value "yes". Why is that? I want to get rid of this
and build Kamailio without futex support. In the same
file there are GCC options like -DUSE_PTHREAD_MUTEX,
-DUSE_POSIX_SEM etc. So I disabled the line use_futex
and and added -DUSE_PTHREAD_MUTEX as follows;<br>
<br>
<span style="font-family:courier new,monospace">#use_futex=
yes<br>
C_DEFS+=-DUSE_PTHREAD_MUTEX</span><br>
<br>
After building Kamailio with these options:<br>
</div>
Although the output of "kamailio -I" indicates that
FUTEX is not used (PTHREAD_MUTEX is used instead) it
still uses futex sneaky as its locking mechanism. I can
see this after catting the content of
/proc/<pid>/wchan.<br>
<br>
This is because Kamailio hangs on futex after running it
a while (see our other issue in the topic "Kamailio
stability/timing problem w.r.t. registrations?"). <br>
<br>
</div>
Question is; How can I build Kamailio with a locking
mechanism other than FUTEX? And why does the solution with
Makefile.defs not work?<br>
</div>
</div>
</div>
</div>
</blockquote>
Maybe the compile switches got mixed over the time, as no one
wanted/played to compile with no futex.<br>
<br>
You should look at the following files to see if you can spot when
the compile switch is not activated:<br>
<br>
lock_alloc.h lock_ops.c lock_ops.h lock_ops_init.h
locking.h<br>
<br>
If you cannot spot a fix, then open an issue on the tracker and
should be investigated in the near future.<br>
<br>
Cheers,<br>
Daniel<br>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla - <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a></pre>
</body>
</html>