search for: libnbd_attribute_nonnul

Displaying 6 results from an estimated 6 matches for "libnbd_attribute_nonnul".

2023 Feb 15
2
[libnbd PATCH v3 02/29] generator/C.ml: use space consistently in func. and func.-like macro calls
...OC_DEALLOC(__builtin_free)"; + pr "\n LIBNBD_ATTRIBUTE_ALLOC_DEALLOC (__builtin_free)"; | _ -> () ); (* Output __attribute__((nonnull)) for the function parameters: * eg. struct nbd_handle *, int, char * * => [ true, false, true ] - * => LIBNBD_ATTRIBUTE_NONNULL(1,3) - * => __attribute__((nonnull(1,3))) + * => LIBNBD_ATTRIBUTE_NONNULL (1, 3) + * => __attribute__ ((nonnull (1, 3))) *) let nns : bool list = [ true ] (* struct nbd_handle * *) @@ -267,7 +267,7 @@ let let nns = List.mapi (fun i b -> (i+1, b)) nns in...
2023 Feb 15
1
[libnbd PATCH v3 02/29] generator/C.ml: use space consistently in func. and func.-like macro calls
...: > Apply the ideas in the previous patch to the C-language bindings > generator. > > Signed-off-by: Laszlo Ersek <lersek at redhat.com> > --- > generator/C.ml | 20 ++++++++++---------- > 1 file changed, 10 insertions(+), 10 deletions(-) > > pr "#ifndef LIBNBD_ATTRIBUTE_NONNULL\n"; > - pr "#if defined(__GNUC__) && LIBNBD_GCC_VERSION >= 120000 /* gcc >= 12.0 */\n"; > - pr "#define LIBNBD_ATTRIBUTE_NONNULL(...) __attribute__((__nonnull__(__VA_ARGS__)))\n"; > + pr "#if defined (__GNUC__) && LIBNBD_GCC_VERSION &...
2023 Mar 15
1
[libnbd PATCH v4 1/3] lib/utils: introduce xwritel() as a more robust and convenient write()
On Wed, Mar 15, 2023 at 03:30:12PM +0100, Laszlo Ersek wrote: > On 3/15/23 15:01, Eric Blake wrote: > > > [...] > > Thanks for the thorough review; I'm glad all the fine points I sought to > put in the patch were received -- and well-received! :) > > One question: > > > The only change I recommend is the addition of the __attribute__; but > > with
2023 Mar 15
4
[libnbd PATCH v4 0/3] lib/utils: add async-signal-safe assert()
This is version 4 of the following sub-series: [libnbd PATCH v3 06/29] lib/utils: introduce xwrite() as a more robust write() [libnbd PATCH v3 07/29] lib/utils: add async-signal-safe assert() [libnbd PATCH v3 08/29] lib/utils: add unit test for async-signal-safe assert() http://mid.mail-archive.com/20230215141158.2426855-7-lersek at redhat.com
2023 Mar 19
3
[libnbd PATCH v4 0/2] lib/utils: introduce async-signal-safe execvpe()
This is version 4 of the following sub-series: [libnbd PATCH v3 09/29] lib/utils: introduce async-signal-safe execvpe() [libnbd PATCH v3 10/29] lib/utils: add unit tests for async-signal-safe execvpe() http://mid.mail-archive.com/20230215141158.2426855-10-lersek at redhat.com http://mid.mail-archive.com/20230215141158.2426855-11-lersek at redhat.com The Notes section on each patch records the
2023 Mar 08
2
[libnbd PATCH v2] lib/errors.c: Fix assert fail in exit path in multi-threaded code
...ib/errors.c +++ b/lib/errors.c @@ -34,6 +34,8 @@ struct last_error { /* Thread-local storage of the last error. */ static pthread_key_t errors_key; +/* Zero if errors_key is invalid, else 1 + threads using errors_key. */ +static _Atomic int key_use_count; static void free_errors_key (void *vp) LIBNBD_ATTRIBUTE_NONNULL (1); @@ -51,6 +53,7 @@ errors_key_create (void) strerror (err)); abort (); } + key_use_count++; } /* Destroy the thread-local key when the library is unloaded. */ @@ -59,16 +62,16 @@ static void errors_key_destroy (void) __attribute__ ((destructor)); static void errors...