search for: if_verbose

Displaying 5 results from an estimated 5 matches for "if_verbose".

Did you mean: __verbose
2019 Nov 02
2
[PATCH nbdkit] server: Use GCC hints to move debug and error handling code out of hot paths.
....h @@ -45,6 +45,17 @@ #include "cleanup.h" #include "nbd-protocol.h" +/* Define unlikely macro, but only for GCC. These are used to move + * debug and error handling code out of hot paths. + */ +#if defined(__GNUC__) +#define unlikely(x) __builtin_expect (!!(x), 0) +#define if_verbose if (unlikely (verbose)) +#else +#define unlikely(x) (x) +#define if_verbose if (verbose) +#endif + #ifdef __APPLE__ #define UNIX_PATH_MAX 104 #else @@ -262,7 +273,11 @@ extern int crypto_negotiate_tls (struct connection *conn, __attribute__((__nonnull__ (1))); /* debug.c */ -#define debug...
2019 Nov 04
0
Re: [PATCH nbdkit] server: Use GCC hints to move debug and error handling code out of hot paths.
...nup.h" > #include "nbd-protocol.h" > > +/* Define unlikely macro, but only for GCC. These are used to move > + * debug and error handling code out of hot paths. > + */ > +#if defined(__GNUC__) > +#define unlikely(x) __builtin_expect (!!(x), 0) > +#define if_verbose if (unlikely (verbose)) Doesn't clang define __GNUC__, at which point all of our supported compilers (since we require __attribute__((cleanup)) support) also have __builtin_expect? > +#else > +#define unlikely(x) (x) > +#define if_verbose if (verbose) > +#endif Or put another w...
2020 Mar 26
0
[PATCH nbdkit 5/9 patch split 3/5] server: Move some definitions in server/internal.h to the top of the file.
...{ \ const typeof (((type *) 0)->member) *__mptr = (ptr); \ (type *) ((char *) __mptr - offsetof(type, member)); \ }) +#define debug(fs, ...) \ + do { \ + if_verbose \ + nbdkit_debug ((fs), ##__VA_ARGS__); \ + } while (0) + /* Maximum read or write request that we will handle. */ #define MAX_REQUEST_SIZE (64 * 1024 * 1024) @@ -286,13 +300,6 @@ extern void crypto_init (bool tls_set_on_cli); exte...
2020 Mar 26
9
[PATCH nbdkit 5/9 patch split 1/5] Create libnbdkit.so.
This is the previous 5/9 patch posted earlier today, split into reviewable chunks. This passes bisection with -x 'make && make check', but I didn't work very hard on the commit messages, so I refer you back to the original patch to explain how it works: https://www.redhat.com/archives/libguestfs/2020-March/msg00248.html Rich.
2020 Mar 26
15
[PATCH nbdkit 0/9] Create libnbdkit.so
This creates libnbdkit.so as discussed in the following thread: https://www.redhat.com/archives/libguestfs/2020-March/thread.html#00203 test-delay-shutdown.sh fails for unclear reasons. This series starts by reverting "tests: Don't strand hung nbdkit processes" which is because several other tests fail randomly unless I revert this patch. I didn't investigate this yet so it