[PATCH] Fix problem with sasl_set_mutex

Nicolas Williams Nicolas.Williams at sun.com
Thu Sep 25 13:10:55 EDT 2008


On Sat, Sep 20, 2008 at 02:41:41PM +0200, Eric Leblond wrote:
> Index: lib/common.c
> ===================================================================
> RCS file: /cvs/src/sasl/lib/common.c,v
> retrieving revision 1.116
> diff -r1.116 common.c
> 154a155,161
> >   /* only one call is permitted, if one of the function has already
> >    * been changed we are in trouble in a subsequent call */
> >   if ((_sasl_mutex_utils.alloc != &sasl_mutex_alloc) ||
> >   	(_sasl_mutex_utils.lock != &sasl_mutex_lock) ||
> > 	(_sasl_mutex_utils.unlock != &sasl_mutex_unlock) ||
> > 	(_sasl_mutex_utils.free != &sasl_mutex_free))
> >      return;

Is there a need for a memory barrier?  (A unified diff might have shown
enough context that I could tell.)

http://docs.sun.com/app/docs/doc/816-5168/membar-ops-3c?a=view
http://www.daemon-systems.org/man/membar_ops.3.html
(libatomic-ops for Linux?)

Nico
-- 


More information about the Cyrus-sasl mailing list