<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>
<br></div><div>PS: Kernel version is 2.6.30 on an ARM platform<br><br></div>Thanks for your support.<br><br></div>Kind regards,<br></div>Orhan Yilmaz<br><br></div>