Displaying 4 results from an estimated 4 matches for "378c2e0".
Did you mean:
378820
2019 Aug 13
0
[PATCH libnbd] api: Rename nbd_aio_*_callback to nbd_aio_*.
...ead>). Libnbd can call these
+functions while processing.
Callbacks have an opaque C<void *user_data> pointer. This is passed
as the second parameter to the callback. The opaque pointer is only
diff --git a/examples/batched-read-write.c b/examples/batched-read-write.c
index d39a1e5..378c2e0 100644
--- a/examples/batched-read-write.c
+++ b/examples/batched-read-write.c
@@ -52,12 +52,13 @@ try_deadlock (void *arg)
int r;
/* Issue commands. */
- cookies[0] = nbd_aio_pread (nbd, in, packetsize, 0, 0);
+ cookies[0] = nbd_aio_pread (nbd, in, packetsize, 0,
+...
2019 Aug 13
2
[PATCH libnbd] api: Rename nbd_aio_*_callback to nbd_aio_*.
This applies on top of the OClosure v2 series posted a few
minutes ago.
Rich.
2019 Aug 13
0
[PATCH libnbd 1/4] api: Combine callback and user_data into a single struct.
...fset,
+ NBD_NULL_CALLBACK(completion), 0);
+
+From other languages the structure and opaque pointer are not needed
+because you can use closures to achieve the same effect.
=head2 Callback lifetimes
diff --git a/examples/batched-read-write.c b/examples/batched-read-write.c
index 378c2e0..a6063af 100644
--- a/examples/batched-read-write.c
+++ b/examples/batched-read-write.c
@@ -53,12 +53,13 @@ try_deadlock (void *arg)
/* Issue commands. */
cookies[0] = nbd_aio_pread (nbd, in, packetsize, 0,
- NULL, NULL, 0);
+ NBD_NU...
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