X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=include%2Fyaz%2Fmutex.h;h=ff8babbd429865dccfa61fe8ebd18c8664cfcf2f;hb=9f11f349958f122419856006d9295eb0ce41274d;hp=414e09fed3cc9ef32d53c798d1267bda72f5d8cc;hpb=46ea0a67951825a03cafc6c90cc6658cfbf40d75;p=yaz-moved-to-github.git diff --git a/include/yaz/mutex.h b/include/yaz/mutex.h index 414e09f..ff8babb 100644 --- a/include/yaz/mutex.h +++ b/include/yaz/mutex.h @@ -52,6 +52,17 @@ typedef struct yaz_cond *YAZ_COND; */ YAZ_EXPORT void yaz_mutex_create(YAZ_MUTEX *mutexp); +/** \brief create MUTEX with custom MUTEX flags + \param mutexp is pointer to MUTEX handle (*mutexp must be NULL) + \param attr is flags defined by PTHREAD_MUTEX_xxx + + It is important that *mutexp is NULL. If not, yaz_mutex_create will + not modify the handle (assumes it is already created!) + + This calls yax_mutex_create_attr(mutexp, PTHREAD_MUTEX_NORMAL) + */ +YAZ_EXPORT void yaz_mutex_create_attr(YAZ_MUTEX *mutexp, int flags); + /** \brief enter critical section / AKA lock \param mutex MUTEX handle */