[SR-Users] How to build Kamailio without FUTEX reference (to use PTHREAD_MUTEX or POSIX_SEM instead)

Sotas Development sotasdev at gmail.com
Tue Dec 3 16:20:01 CET 2013


Hi,

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;

#use_futex= yes
C_DEFS+=-DUSE_PTHREAD_MUTEX

After building Kamailio with these options:
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.

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?").

Question is; How can I build Kamailio with a locking mechanism other than
FUTEX? And why does the solution with Makefile.defs not work?

PS: Kernel version is 2.6.30 on an ARM platform

Thanks for your support.

Kind regards,
Orhan Yilmaz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20131203/654bbf5a/attachment.html>


More information about the sr-users mailing list