mutex_lock function and sasl_set_mutex

Ted Yu yuzhihong at gmail.com
Sun Apr 16 06:38:22 EDT 2017


Hi,
Looking at sasl_set_mutex function shown
in cyrus-sasl-2.1.26/utils/testsuite.c :

int my_mutex_lock(my_mutex_t *m)
{
    if (m->val != 0)
    {
      fatal("Trying to lock a mutex already locked [single-threaded app]");
    }

Wouldn't calling pthread_mutex_lock() better handle concurrent invocations
of the mutex lock function ?

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.andrew.cmu.edu/pipermail/cyrus-sasl/attachments/20170416/faa94b16/attachment.html>


More information about the Cyrus-sasl mailing list