nufw-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Nufw-devel] Re: [PATCH] Fix problem with sasl_set_mutex


From: Alexey Melnikov
Subject: [Nufw-devel] Re: [PATCH] Fix problem with sasl_set_mutex
Date: Fri, 26 Sep 2008 12:33:09 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12) Gecko/20050915

Nicolas Williams wrote:

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?)
If we can do this is a crossplatform way (including Windows), that would be helpful.

However sasl_set_mutex is not supposed to be called from multiple threads (it is supposed to be called before the application starts creating threads), so I wouldn't worry too much about this.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]