[Asterisk-Dev] FreeBSD recursive mutexes - please help

Tilghman Lesher tilghman at mail.jeffandtilghman.com
Tue May 4 15:03:55 MST 2004


On Tuesday 04 May 2004 16:28, Markus Wild wrote:
> > 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.
>
> Uhm... you mean this one from <pthread.h> ?
> #define PTHREAD_MUTEX_INITIALIZER       NULL

No, I was referring to the code in:
/usr/src/lib/libc/stdtime/localtime.c, which is the original code for:
/usr/src/asterisk/stdtime/localtime.c.

There are a few changes I've made to that source, in order to have
it work in the Asterisk environment, but that's where I'm getting that
particular mutex initializer.

-Tilghman




More information about the asterisk-dev mailing list