Displaying 3 results from an estimated 3 matches for "e6e6140".
2019 Apr 23
1
[RFC: nbdkit PATCH] cleanup: Assert mutex sanity
...move cleanup.c to common/
Should I also go through and add checking to other bare
pthread_mutex_[un]lock() calls?
common/utils/cleanup.h | 5 ++++-
common/utils/cleanup.c | 3 ++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/common/utils/cleanup.h b/common/utils/cleanup.h
index e6e6140..0ab9e65 100644
--- a/common/utils/cleanup.h
+++ b/common/utils/cleanup.h
@@ -43,6 +43,9 @@ extern void cleanup_unlock (pthread_mutex_t **ptr);
#define CLEANUP_UNLOCK __attribute__((cleanup (cleanup_unlock)))
#define ACQUIRE_LOCK_FOR_CURRENT_SCOPE(mutex) \
CLEANUP_UNLOCK pthread_mutex_t *_lock...
2019 Apr 23
0
[nbdkit PATCH 1/4] cleanup: Move cleanup.c to common
...4 ++-
server/Makefile.am | 7 +++--
5 files changed, 58 insertions(+), 18 deletions(-)
create mode 100644 common/utils/cleanup.h
rename {server => common/utils}/cleanup.c (96%)
diff --git a/common/utils/cleanup.h b/common/utils/cleanup.h
new file mode 100644
index 0000000..e6e6140
--- /dev/null
+++ b/common/utils/cleanup.h
@@ -0,0 +1,48 @@
+/* nbdkit
+ * Copyright (C) 2013-2019 Red Hat Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of...
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