Displaying 2 results from an estimated 2 matches for "5e14347".
2019 Apr 23
0
[nbdkit PATCH 3/4] filters: Utilize ACQUIRE_LOCK_FOR_CURRENT_SCOPE
...thread_mutex_lock (&lock);
- r = ++h->id;
- pthread_mutex_unlock (&lock);
- return r;
+ ACQUIRE_LOCK_FOR_CURRENT_SCOPE(&lock);
+ return ++h->id;
}
/* Output a timestamp and the log message. */
diff --git a/filters/readahead/readahead.c b/filters/readahead/readahead.c
index 5e14347..f46b6b0 100644
--- a/filters/readahead/readahead.c
+++ b/filters/readahead/readahead.c
@@ -42,6 +42,7 @@
#include <nbdkit-filter.h>
+#include "cleanup.h"
#include "minmax.h"
#define THREAD_MODEL NBDKIT_THREAD_MODEL_PARALLEL
@@ -150,7 +151,7 @@ readahead_pread (struc...
2019 Apr 23
8
[nbdkit PATCH 0/4] Start using cleanup macros in filters/plugins
There's more that can be done (in particular, use of CLEANUP_FREE),
but this is enough to at least see if I'm on the right track.
I couldn't figure out an obvious difference between common/include and
common/utils, but it looks like the former is for things that are
inlineable via .h only, while the latter is when you need to link in
a convenience library, so this landed in the