[Asterisk-Dev] FreeBSD recursive mutexes - please help

Tilghman Lesher tilghman at mail.jeffandtilghman.com
Tue May 4 13:33:13 MST 2004


On Tuesday 04 May 2004 14:30, Olle E. Johansson wrote:
> http://bugs.digium.com/bug_view_page.php?bug_id=0001411
>
> I've digged up some reference code from other open source projects
> that have implemented recursive mutexes on *BSD platforms.
>
> What we need now is someone that knows how to code this, based on
> inspiration from the examples.
>
> This is the one bug that stands between FreeBSD and Asterisk 1.0.
>
> (There's another, smaller one, in app_sms, but we'll take that one
> later since we haven't got any PRI connections on FreeBSD yet)

Just use PTHREAD_MUTEX_STATIC_INITIALIZER in FreeBSD.  That's
the initializer that was used in the original stdtime/localtime.c
which came out of FreeBSD!  I had to change the mutexes for Asterisk,
because at the time, Asterisk was using non-recursive mutexes.  This
mutex for FreeBSD should therefore already be recursive.

-Tilghman




More information about the asterisk-dev mailing list