search for: pthread_mutex_

Displaying 4 results from an estimated 4 matches for "pthread_mutex_".

Did you mean: pthread_mutex_t
2019 Apr 23
1
[RFC: nbdkit PATCH] cleanup: Assert mutex sanity
Although we haven't always checked that pthread_mutex_[un]lock succeeded, it never hurts to avoid blatant programming bugs such as when EINVAL can detect use of an uninitialized mutex. Signed-off-by: Eric Blake <eblake@redhat.com> --- Applies on top of my series to move cleanup.c to common/ Should I also go through and add checking to other ba...
2014 Jun 09
2
[LLVMdev] Multi-threading and mutexes in LLVM
...ther similar > tools) detects lock order inversion, i.e. a situation which may potentially > lead to a deadlock. > > Yes, that's what WITNESS does in the FreeBSD kernel. The line after the > one you quoted mentioned the port of this to userspace pthreads. > Did it extend the pthread_mutex_t data structure? > > David > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140609/8aef7ac0/attachment.html>
2018 Feb 09
3
[PATCH] Add a cache for iconv_t handles to hive_t
...+#include <iconv.h> +#include <pthread.h> + #ifdef HAVE_MMAP #include <sys/mman.h> #else @@ -62,6 +65,32 @@ header_checksum (const hive_h *h) #define HIVEX_OPEN_MSGLVL_MASK (HIVEX_OPEN_VERBOSE|HIVEX_OPEN_DEBUG) +iconv_t * +_hivex_get_iconv (hive_h *h, recode_type t) +{ + pthread_mutex_lock (&h->iconv_cache[t].mutex); + if (h->iconv_cache[t].handle == NULL) { + if (t == utf8_to_latin1) + h->iconv_cache[t].handle = iconv_open ("LATIN1", "UTF-8"); + else if (t == latin1_to_utf8) + h->iconv_cache[t].handle = iconv_open ("UTF-8...
2018 Feb 09
0
Re: [PATCH] Add a cache for iconv_t handles to hive_t
...odules near the end. You'll probably need to rerun ./bootstrap after this. (2) Read ‘.gnulib/modules/threadlib’ and follow the instructions for modifying configure.ac and Makefile.am. (3) Replace #include <pthread.h> -> #include "glthread/lock.h". (4) Replace any calls to pthread_mutex_* with gl_lock_*. It's probably not necessary to check return codes, unless they need to be recursive in which case use gl_recursive_lock_* instead. > #ifdef HAVE_MMAP > #include <sys/mman.h> > #else > @@ -62,6 +65,32 @@ header_checksum (const hive_h *h) > > #defi...