Documentation: Specify the constraint of the 'completed' parameter
authorChris Dickens <christopher.a.dickens@gmail.com>
Tue, 18 Aug 2020 22:03:32 +0000 (15:03 -0700)
committerChris Dickens <christopher.a.dickens@gmail.com>
Tue, 18 Aug 2020 22:03:32 +0000 (15:03 -0700)
Closes #482

Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
libusb/io.c
libusb/version_nano.h

index b95c382..54bef8a 100644 (file)
@@ -920,6 +920,11 @@ void myfunc() {
  * do is submit a single transfer and wait for its completion, then using
  * one of the synchronous I/O functions is much easier.
  *
+ * \note
+ * The `completed` variable must be modified while holding the event lock,
+ * otherwise a race condition can still exist. It is simplest to do so from
+ * within the transfer callback as shown above.
+ *
  * \section eventlock The events lock
  *
  * The problem is when we consider the fact that libusb exposes file
index 1c9bd62..0ffc182 100644 (file)
@@ -1 +1 @@
-#define LIBUSB_NANO 11546
+#define LIBUSB_NANO 11547