search for: libnbd_have_nbd_create

Displaying 15 results from an estimated 15 matches for "libnbd_have_nbd_create".

2019 Jun 03
1
[libnbd PATCH] generator: Add #define witnesses for all API
...de_libnbd_h () = generate_header CStyle; @@ -2729,14 +2735,23 @@ let generate_include_libnbd_h () = List.iter (fun (n, i) -> pr "#define LIBNBD_%-30s %d\n" n i) constants; pr "\n"; pr "extern struct nbd_handle *nbd_create (void);\n"; + pr "#define LIBNBD_HAVE_NBD_CREATE 1\n"; + pr "\n"; pr "extern void nbd_close (struct nbd_handle *h);\n"; + pr "#define LIBNBD_HAVE_NBD_CLOSE 1\n"; + pr "\n"; pr "extern const char *nbd_get_error (void);\n"; + pr "#define LIBNBD_HAVE_NBD_GET_ERROR 1\n"; + pr...
2023 Feb 15
2
[libnbd PATCH v3 02/29] generator/C.ml: use space consistently in func. and func.-like macro calls
...et pr "#define LIBNBD_HAVE_NBD_CLOSE 1\n"; pr "\n"; pr "extern struct nbd_handle *nbd_create (void)\n"; - pr " LIBNBD_ATTRIBUTE_ALLOC_DEALLOC(nbd_close);\n"; + pr " LIBNBD_ATTRIBUTE_ALLOC_DEALLOC (nbd_close);\n"; pr "#define LIBNBD_HAVE_NBD_CREATE 1\n"; pr "\n"; pr "extern const char *nbd_get_error (void);\n";
2019 Jun 18
0
[libnbd RFC PATCH 9/8] wip: generator: Add ReadStatus enum type
...fun (name, list) -> + pr "enum %s {\n" name; + List.iter (fun (n, i) -> pr " LIBNBD_%-30s = %d,\n" n i) list; + pr "};\n" + ) enums; + pr "\n"; pr "extern struct nbd_handle *nbd_create (void);\n"; pr "#define LIBNBD_HAVE_NBD_CREATE 1\n"; pr "\n"; @@ -3367,6 +3380,7 @@ let print_python_binding name { args; ret } = | Int _ -> () | Opaque n -> pr " struct %s_%s_data *_data = %s;\n" name cb_name n + | ReadStatus n | String n | UInt64 n...
2019 Jun 20
1
Re: [libnbd RFC PATCH 9/8] wip: generator: Add ReadStatus enum type
...pr "enum %s {\n" name; > + List.iter (fun (n, i) -> pr " LIBNBD_%-30s = %d,\n" n i) list; > + pr "};\n" > + ) enums; > + pr "\n"; > pr "extern struct nbd_handle *nbd_create (void);\n"; > pr "#define LIBNBD_HAVE_NBD_CREATE 1\n"; > pr "\n"; > @@ -3367,6 +3380,7 @@ let print_python_binding name { args; ret } = > | Int _ -> () > | Opaque n -> > pr " struct %s_%s_data *_data = %s;\n" name cb_name n > + | ReadStatus n >...
2019 Aug 12
0
[PATCH libnbd 7/7] api: Remove the valid_flag from all callbacks.
...= pr "#define %-40s %d\n" n i ) constants; pr "\n"; - pr "#define LIBNBD_CALLBACK_VALID 1\n"; - pr "#define LIBNBD_CALLBACK_FREE 2\n"; - pr "\n"; pr "extern struct nbd_handle *nbd_create (void);\n"; pr "#define LIBNBD_HAVE_NBD_CREATE 1\n"; pr "\n"; @@ -4226,26 +4218,25 @@ let print_python_binding name { args; optargs; ret; may_set_error } = pr "{\n"; pr " int ret = 0;\n"; pr "\n"; - pr " if (valid_flag & LIBNBD_CALLBACK_VALID) {\n"; -...
2019 Jul 24
0
[PATCH libnbd 2/3] lib: Implement closure lifetimes.
...-> pr "#define LIBNBD_%-30s %d\n" n i) constants; pr "\n"; + pr "#define LIBNBD_CALLBACK_VALID 1\n"; + pr "#define LIBNBD_CALLBACK_FREE 2\n"; + pr "\n"; pr "extern struct nbd_handle *nbd_create (void);\n"; pr "#define LIBNBD_HAVE_NBD_CREATE 1\n"; pr "\n"; @@ -3795,27 +3788,14 @@ let print_python_binding name { args; ret } = *) List.iter ( function - | Closure (persistent, { cbname; cbargs }) -> - (* Persistent closures need an explicit function to decrement - * the closure refcounts and...
2019 Aug 13
0
[PATCH libnbd 2/4] api: Add free function and remove valid_flag parameter.
...= pr "#define %-40s %d\n" n i ) constants; pr "\n"; - pr "#define LIBNBD_CALLBACK_VALID 1\n"; - pr "#define LIBNBD_CALLBACK_FREE 2\n"; - pr "\n"; pr "extern struct nbd_handle *nbd_create (void);\n"; pr "#define LIBNBD_HAVE_NBD_CREATE 1\n"; pr "\n"; @@ -4032,26 +4025,25 @@ let print_python_closure_wrapper { cbname; cbargs } = pr "{\n"; pr " int ret = 0;\n"; pr "\n"; - pr " if (valid_flag & LIBNBD_CALLBACK_VALID) {\n"; - pr " PyGILState_STATE py_sa...
2019 Jul 24
0
[PATCH libnbd v2 2/5] lib: Implement closure lifetimes.
...-> pr "#define LIBNBD_%-30s %d\n" n i) constants; pr "\n"; + pr "#define LIBNBD_CALLBACK_VALID 1\n"; + pr "#define LIBNBD_CALLBACK_FREE 2\n"; + pr "\n"; pr "extern struct nbd_handle *nbd_create (void);\n"; pr "#define LIBNBD_HAVE_NBD_CREATE 1\n"; pr "\n"; @@ -3795,47 +3788,35 @@ let print_python_binding name { args; ret } = *) List.iter ( function - | Closure (persistent, { cbname; cbargs }) -> - (* Persistent closures need an explicit function to decrement - * the closure refcounts and...
2019 Jul 25
0
[PATCH libnbd v3 1/2] lib: Implement closure lifetimes.
...-> pr "#define LIBNBD_%-30s %d\n" n i) constants; pr "\n"; + pr "#define LIBNBD_CALLBACK_VALID 1\n"; + pr "#define LIBNBD_CALLBACK_FREE 2\n"; + pr "\n"; pr "extern struct nbd_handle *nbd_create (void);\n"; pr "#define LIBNBD_HAVE_NBD_CREATE 1\n"; pr "\n"; @@ -3714,28 +3707,16 @@ let print_python_binding name { args; ret } = *) List.iter ( function - | Closure (persistent, { cbname; cbargs }) -> - (* Persistent closures need an explicit function to decrement - * the closure refcounts and...
2019 Jun 18
17
[libnbd PATCH 0/8] Add nbd_pread_callback
I've mentioned this topic before (in fact, the idea of adding NBD_CMD_FLAG_DF was first mentioned at [1]), but finally finished enough of an implementation to feel confident in posting it. I'd still like to add something under examples/ that uses the new API to implement strict checking of a server's structured replies read implementation (ensure that a server never sends data after
2019 Jul 25
4
[PATCH libnbd v3 0/2] lib: Implement closure lifetimes.
I think I've addressed everything that was raised in review. Some of the highlights: - Callbacks should be freed reliably along all exit paths. - There's a simple test of closure lifetimes. - I've tried to use VALID|FREE in all the places where I'm confident that it's safe and correct to do. There may be more places. Note this is an optimization and shouldn't
2019 Aug 12
14
[PATCH libnbd 0/7] Add free callbacks and remove valid_flag.
As proposed here: https://www.redhat.com/archives/libguestfs/2019-August/msg00130.html I didn't actually read Eric's replies to that yet because I've been concentrating on writing these patches all day. Anyway here they are and I'll look at what Eric said about the proposal next. Rich.
2019 Jul 24
8
[PATCH libnbd v2 0/5] lib: Implement closure lifetimes.
v1 was here: https://www.redhat.com/archives/libguestfs/2019-July/thread.html#00231 The changes address everything that Eric picked up in his review of the first two patches. I have also added two more patches (4 and 5) which respectively fix docs and change int status -> unsigned status, as discussed. Passes make, check, check-valgrind. Rich.
2019 Jul 24
6
[PATCH libnbd 0/3] Implement closure lifetimes.
This implements most of what I wrote here: https://www.redhat.com/archives/libguestfs/2019-July/msg00213.html
2019 Aug 13
8
[PATCH libnbd 0/4] Add free function to callbacks.
Patches 1 & 2 are rather complex, but the end result is that we pass closures + user_data + free function in single struct parameters as I described previously in this email: https://www.redhat.com/archives/libguestfs/2019-August/msg00210.html Patch 3 adds a convenient FREE_CALLBACK macro which seems a worthwhile simplification if you buy into 1 & 2. Patch 4 adds another macro which is